def systemMessage(self, message):
        whisper = WhisperPopup(message, OTPGlobals.getInterfaceFont(), WTSystem)
        whisper.manage(base.marginManager)

        if self.systemMessageSfx is None:
            self.systemMessageSfx = base.loadSfx('phase_3/audio/sfx/clock03.ogg')

        base.playSfx(self.systemMessageSfx)
Example #2
0
    def systemMessage(self, message):
        whisper = WhisperPopup(message, OTPGlobals.getInterfaceFont(),
                               WTSystem)
        whisper.manage(base.marginManager)

        if self.systemMessageSfx is None:
            self.systemMessageSfx = base.loadSfx(
                'phase_3/audio/sfx/clock03.ogg')

        base.playSfx(self.systemMessageSfx)
 def announceWinner(self, winString, avId):
     if avId == base.localAvatar.getDoId():
         sound = Sequence(Wait(2.0), Parallel(SoundInterval(self.winSound), SoundInterval(self.happyDance)))
         sound.start()
         base.cr.playGame.getPlace().setState('walk')
         if winString == 'Chinese Checkers':
             whisper = WhisperPopup(TTLocalizer.ChineseCheckersYouWon, OTPGlobals.getInterfaceFont(), WhisperPopup.WTNormal)
         elif winString == 'Checkers':
             whisper = WhisperPopup(TTLocalizer.RegularCheckersYouWon, OTPGlobals.getInterfaceFont(), WhisperPopup.WTNormal)
         elif winString == 'Find Four':
             whisper = WhisperPopup(TTLocalizer.FindFourYouWon, OTPGlobals.getInterfaceFont(), WhisperPopup.WTNormal)
     elif self.cr.doId2do.has_key(avId):
         stateString = self.fsm.getCurrentState().getName()
         if stateString == 'sitting' or stateString == 'observing':
             base.cr.playGame.getPlace().setState('walk')
         av = self.cr.doId2do[avId]
         if winString == 'Chinese Checkers':
             whisper = WhisperPopup(av.getName() + TTLocalizer.ChineseCheckersGameOf + TTLocalizer.ChineseCheckers, OTPGlobals.getInterfaceFont(), WhisperPopup.WTNormal)
         elif winString == 'Checkers':
             whisper = WhisperPopup(av.getName() + TTLocalizer.RegularCheckersGameOf + TTLocalizer.RegularCheckers, OTPGlobals.getInterfaceFont(), WhisperPopup.WTNormal)
         elif winString == 'Find Four':
             whisper = WhisperPopup(av.getName() + TTLocalizer.FindFourGameOf + TTLocalizer.FindFour, OTPGlobals.getInterfaceFont(), WhisperPopup.WTNormal)
     if self.cr.doId2do.has_key(avId):
         toon = self.cr.doId2do[avId]
         self.winTrack = Sequence(autoFinish=1)
         if self.outTrack.isPlaying():
             self.winTrack.append(Wait(2.0))
         if avId == base.localAvatar.getDoId():
             self.winTrack.append(Func(self.stopToWalk))
         self.winTrack.append(ActorInterval(toon, 'happy-dance'))
         if avId == base.localAvatar.getDoId():
             self.winTrack.append(Func(self.allowToWalk))
         self.winTrack.start()
     whisper.manage(base.marginManager)
Example #4
0
 def announceWinner(self, winString, avId):
     if avId == base.localAvatar.getDoId():
         sound = Sequence(
             Wait(2.0),
             Parallel(SoundInterval(self.winSound),
                      SoundInterval(self.happyDance)))
         sound.start()
         base.cr.playGame.getPlace().setState('walk')
         if winString == 'Chinese Checkers':
             whisper = WhisperPopup(TTLocalizer.ChineseCheckersYouWon,
                                    OTPGlobals.getInterfaceFont(),
                                    WhisperPopup.WTNormal)
         elif winString == 'Checkers':
             whisper = WhisperPopup(TTLocalizer.RegularCheckersYouWon,
                                    OTPGlobals.getInterfaceFont(),
                                    WhisperPopup.WTNormal)
         elif winString == 'Find Four':
             whisper = WhisperPopup(TTLocalizer.FindFourYouWon,
                                    OTPGlobals.getInterfaceFont(),
                                    WhisperPopup.WTNormal)
     elif self.cr.doId2do.has_key(avId):
         stateString = self.fsm.getCurrentState().getName()
         if stateString == 'sitting' or stateString == 'observing':
             base.cr.playGame.getPlace().setState('walk')
         av = self.cr.doId2do[avId]
         if winString == 'Chinese Checkers':
             whisper = WhisperPopup(
                 av.getName() + TTLocalizer.ChineseCheckersGameOf +
                 TTLocalizer.ChineseCheckers, OTPGlobals.getInterfaceFont(),
                 WhisperPopup.WTNormal)
         elif winString == 'Checkers':
             whisper = WhisperPopup(
                 av.getName() + TTLocalizer.RegularCheckersGameOf +
                 TTLocalizer.RegularCheckers, OTPGlobals.getInterfaceFont(),
                 WhisperPopup.WTNormal)
         elif winString == 'Find Four':
             whisper = WhisperPopup(
                 av.getName() +
                 TTLocalizer.FindFourGameOf + TTLocalizer.FindFour,
                 OTPGlobals.getInterfaceFont(), WhisperPopup.WTNormal)
     if self.cr.doId2do.has_key(avId):
         toon = self.cr.doId2do[avId]
         self.winTrack = Sequence(autoFinish=1)
         if self.outTrack.isPlaying():
             self.winTrack.append(Wait(2.0))
         if avId == base.localAvatar.getDoId():
             self.winTrack.append(Func(self.stopToWalk))
         self.winTrack.append(ActorInterval(toon, 'happy-dance'))
         if avId == base.localAvatar.getDoId():
             self.winTrack.append(Func(self.allowToWalk))
         self.winTrack.start()
     whisper.manage(base.marginManager)