示例#1
0
    def exitWalk(self):
        self.walkStateData.exit()
        self.ignore(self.walkDoneEvent)
        if base.cr.playGame.hood.titleText != None:
            base.cr.playGame.hood.hideTitleText()
        if hasattr(self, 'watchTunnelSeq'):
            self.watchTunnelSeq.pause()
            del self.watchTunnelSeq
        NametagGlobals.setWantActiveNametags(False)
        NametagGlobals.makeTagsInactive()

        if base.localAvatar.getBattleZone():
            base.localAvatar.setBusy(1)

        base.localAvatar.disablePicking()
        self.hideFriendsStuff()
        if base.localAvatar.invGui:
            base.localAvatar.invGui.disable()
        if base.localAvatar.questManager:
            base.localAvatar.questManager.disableShowQuestsHotkey()
        if self.useFirstPerson:
            if base.localAvatar.getBattleZone():
                self.firstPerson.enableMouse()
                self.firstPerson.end()
                self.firstPerson.reallyEnd()
                base.localAvatar.getShadow().show()
                base.localAvatar.find('**/torso-top').show()
                base.localAvatar.find('**/torso-bot').show()
                base.localAvatar.getPart('head').show()
        return
示例#2
0
    def enterWalk(self, teleportIn=0, wantMouse=1):
        self.walkStateData.enter(wantMouse)
        if teleportIn == 0:
            self.walkStateData.fsm.request('walking')
        self.acceptOnce(self.walkDoneEvent, self.handleWalkDone)
        self.walkStateData.fsm.request('walking')
        self.watchTunnelSeq = Sequence(Wait(1.0),
                                       Func(LinkTunnel.globalAcceptCollisions))
        self.watchTunnelSeq.start()
        NametagGlobals.setWantActiveNametags(True)
        NametagGlobals.makeTagsReady()

        if base.localAvatar.getBattleZone():
            if self.useFirstPerson:
                base.localAvatar.stopSmartCamera()
                camera.setPos(base.localAvatar.smartCamera.firstPersonCamPos)
                self.firstPerson.start()
                self.firstPerson.reallyStart()
                self.firstPerson.disableMouse()
                base.localAvatar.getGeomNode().show()
                base.localAvatar.getShadow().hide()
                base.localAvatar.find('**/torso-top').hide()
                base.localAvatar.find('**/torso-bot').hide()
                base.localAvatar.getPart('head').hide()
            base.localAvatar.setBusy(1)
        else:
            base.localAvatar.setBusy(0)
            base.localAvatar.enablePicking()
            base.localAvatar.showFriendButton()
            base.localAvatar.questManager.enableShowQuestsHotkey()
        messenger.send(CIGlobals.ENTER_WALK_EVENT, [])
示例#3
0
 def exitShtickerBook(self):
     base.localAvatar.stopPosHprBroadcast()
     base.localAvatar.disableLaffMeter()
     self.ignore(self.shtickerBookStateData.doneEvent)
     self.shtickerBookStateData.exit()
     self.shtickerBookStateData.unload()
     del self.shtickerBookStateData
     base.localAvatar.hideBookButton()
     self.hideFriendsStuff()
     NametagGlobals.setWantActiveNametags(False)
     NametagGlobals.makeTagsInactive()
     self.ignore('escape-up')
示例#4
0
 def enterShtickerBookGui(self):
     doneEvent = 'shtickerBookDone'
     self.shtickerBookStateData = ShtickerBook(doneEvent)
     self.acceptOnce(doneEvent, self.__shtickerBookDone)
     self.shtickerBookStateData.load()
     self.shtickerBookStateData.enter(self.lastBookPage)
     base.localAvatar.showBookButton(1)
     base.localAvatar.b_setAnimState('readBook')
     base.localAvatar.showFriendButton()
     NametagGlobals.setWantActiveNametags(True)
     NametagGlobals.makeTagsReady()
     self.acceptOnce('escape-up', base.localAvatar.bookButtonClicked, [0])
示例#5
0
    def __shtickerBookDone(self):
        self.hideFriendsStuff()
        NametagGlobals.setWantActiveNametags(False)
        NametagGlobals.makeTagsInactive()
        self.ignore('escape-up')
        doneStatus = self.shtickerBookStateData.getDoneStatus()
        base.localAvatar.hideBookButton()
        self.shtickerBookStateData.exit()

        data = []
        if doneStatus['mode'] == 'exit':
            data = [self.__handleBookCloseExit, []]
        elif doneStatus['mode'] == 'teleport':
            data = [self.__handleBookCloseTeleport, [doneStatus]]
        elif doneStatus['mode'] == 'resume':
            data = [self.__handleBookCloseResume, [doneStatus]]
        elif doneStatus['mode'] == 'switchShard':
            data = [self.__handleBookCloseSwitchShard, [doneStatus]]

        if base.localAvatar.isFirstPerson():
            # Don't wait for an animation we can't see.
            data[0](*data[1])
        else:
            base.localAvatar.b_setAnimState('closeBook', data[0], data[1])