예제 #1
0
    def OnNotify(self, state, id, events):
        global AlreadyClosed

        if (id == RgnSnsrSndLogTracks.id and state):
            import xSndLogTracks
            if xSndLogTracks.IsLogMode():
                print "Start of Egg!!! Enable Riven scope clickable"
                ClkSndLogTracks.enable()
            else:
                print "not this time"
                ClkSndLogTracks.disable()

        if (id == ClkSndLogTracks.id and state):
            #PtPageInNode("clftSndLogTracks")
            RespSndLogTracks.run(self.key, avatar=PtGetLocalAvatar())

        if AlreadyClosed:
            print "failed AlreadyClosed check"
            return

        for event in events:
            if event[0] == PtEventType.kBook:
                if event[1] == PtBookEventTypes.kNotifyHide:
                    AlreadyClosed = true
                    PtFadeOut(kFadeOutToGameSeconds, 1)
                    print "clftEndingCredits.OnNotify(): Book hidden. FadeOut over", kFadeOutToGameSeconds, " seconds"

                    #The book is already hidden, so just go ahead and fade back in on the game
                    PtAtTimeCallback(self.key, kFadeOutToGameSeconds,
                                     kFadeOutToGameID)

                elif event[1] == PtBookEventTypes.kNotifyClose:
                    AlreadyClosed = true
                    PtFadeOut(kFadeOutToGameSeconds, 1)
                    print "clftEndingCredits.OnNotify(): Book closed. FadeOut over", kFadeOutToGameSeconds, " seconds"

                    #We have to hide the book first before we fade back in on the game
                    PtAtTimeCallback(self.key, kFadeOutToGameSeconds + 1,
                                     kHideBookID)
예제 #2
0
def SndIsLogMode(args):
    import xSndLogTracks
    if xSndLogTracks.IsLogMode():
        print "yes"
    else:
        print "not yet"