コード例 #1
0
 def announceGenerate(self):
     DistributedObject.DistributedObject.announceGenerate(self)
     base.minigame = self
     self.alertText = getAlertText()
     self.popupSound = base.loadSfx(
         'phase_3/audio/sfx/GUI_balloon_popup.ogg')
     NametagGlobals.setWant2dNametags(False)
コード例 #2
0
 def exitWalk(self):
     self.walkStateData.exit()
     self.ignore(self.walkDoneEvent)
     if base.cr.playGame.hood.titleText != None:
         base.cr.playGame.hood.hideTitleText()
     self.watchTunnelSeq.pause()
     del self.watchTunnelSeq
     NametagGlobals.setWantActiveNametags(False)
     NametagGlobals.makeTagsInactive()
     base.localAvatar.setBusy(1)
     base.localAvatar.disablePicking()
     base.localAvatar.hideFriendButton()
     if base.localAvatar.friendsList:
         base.localAvatar.friendsList.fsm.requestFinalState()
     if base.localAvatar.panel:
         base.localAvatar.panel.fsm.requestFinalState()
     if self.useFirstPerson:
         if base.localAvatar.getMyBattle():
             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
コード例 #3
0
 def enterWalk(self, teleportIn=0):
     self.walkStateData.enter()
     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()
     base.localAvatar.setBusy(0)
     base.localAvatar.enablePicking()
     base.localAvatar.showFriendButton()
     NametagGlobals.setWantActiveNametags(True)
     NametagGlobals.makeTagsReady()
     if self.useFirstPerson:
         if base.localAvatar.getMyBattle():
             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.chatInput.disableKeyboardShortcuts()
コード例 #4
0
 def enterBattle(self, ts):
     NametagGlobals.setWant2dNametags(True)
     base.localAvatar.walkControls.setCollisionsActive(1)
     self.cr.playGame.getPlace().fsm.request('walk')
     base.localAvatar.hideBookButton()
     taskMgr.add(self.monitorHP, self.uniqueName('monitorHP'))
     for path in self.getRoomData('room_sections'):
         self.accept('enter' + path, self.__handleEnteredRoomSection)
コード例 #5
0
 def disable(self):
     NametagGlobals.setWant2dNametags(True)
     base.localAvatar.setPosHpr(0, 0, 0, 0, 0, 0)
     self.fsm.requestFinalState()
     del self.fsm
     self.winSfx = None
     self.loseSfx = None
     self.prizeHigh = None
     self.prizeLow = None
     self.headPanels.delete()
     self.headPanels = None
     self.finalScoreUI.unload()
     self.finalScoreUI = None
     base.minigame = None
     DistributedObject.DistributedObject.disable(self)
コード例 #6
0
 def enterRideElevator(self, ts):
     elevator = self.elevators[0]
     NametagGlobals.setWant2dNametags(False)
     base.camLens.setFov(CIGlobals.DefaultCameraFov)
     camera.reparentTo(elevator.getElevatorModel())
     camera.setPos(0, 14, 4)
     camera.setHpr(180, 0, 0)
     base.transitions.noTransitions()
     base.playMusic(self.rideElevatorMusic, volume=0.8, looping=1)
     self.elevatorTrack = getRideElevatorInterval()
     self.elevatorTrack.append(Func(self.__doFloorTextPulse))
     self.elevatorTrack.append(
         getOpenInterval(self, elevator.getLeftDoor(),
                         elevator.getRightDoor(), self.openSfx, None))
     self.elevatorTrack.start(ts)
     return
コード例 #7
0
 def disable(self):
     base.localAvatar.getGeomNode().setColorScale(VBase4(1, 1, 1, 1))
     if hasattr(self, 'gameOverLbl') and self.gameOverLbl:
         self.gameOverLbl.destroy()
     self.gameOverLbl = None
     NametagGlobals.setWant2dNametags(True)
     base.localAvatar.setPosHpr(0, 0, 0, 0, 0, 0)
     self.fsm.requestFinalState()
     del self.fsm
     self.winSfx = None
     self.loseSfx = None
     self.prizeHigh = None
     self.prizeLow = None
     self.headPanels.delete()
     self.headPanels = None
     self.finalScoreUI.unload()
     self.finalScoreUI = None
     base.minigame = None
     DistributedObject.DistributedObject.disable(self)
     return
コード例 #8
0
vfs.mount(Filename("phase_8.mf"), ".", VirtualFileSystem.MFReadOnly)
vfs.mount(Filename("phase_9.mf"), ".", VirtualFileSystem.MFReadOnly)
vfs.mount(Filename("phase_10.mf"), ".", VirtualFileSystem.MFReadOnly)
vfs.mount(Filename("phase_11.mf"), ".", VirtualFileSystem.MFReadOnly)
vfs.mount(Filename("phase_12.mf"), ".", VirtualFileSystem.MFReadOnly)
vfs.mount(Filename("phase_13.mf"), ".", VirtualFileSystem.MFReadOnly)

base.cTrav = CollisionTraverser()
base.shadowTrav = CollisionTraverser()
base.lifter = CollisionHandlerGravity()
base.pusher = CollisionHandlerPusher()
from lib.coginvasion.nametag import NametagGlobals
from lib.coginvasion.margins.MarginManager import MarginManager
from lib.coginvasion.margins import MarginGlobals

NametagGlobals.setMe(base.cam)
NametagGlobals.setCardModel('phase_3/models/props/panel.bam')
NametagGlobals.setArrowModel('phase_3/models/props/arrow.bam')
NametagGlobals.setChatBalloon3dModel('phase_3/models/props/chatbox.bam')
NametagGlobals.setChatBalloon2dModel(
    'phase_3/models/props/chatbox_noarrow.bam')
NametagGlobals.setThoughtBalloonModel(
    'phase_3/models/props/chatbox_thought_cutout.bam')
chatButtonGui = loader.loadModel('phase_3/models/gui/chat_button_gui.bam')
NametagGlobals.setPageButton(chatButtonGui.find('**/Horiz_Arrow_UP'),
                             chatButtonGui.find('**/Horiz_Arrow_DN'),
                             chatButtonGui.find('**/Horiz_Arrow_Rllvr'),
                             chatButtonGui.find('**/Horiz_Arrow_UP'))
NametagGlobals.setQuitButton(chatButtonGui.find('**/CloseBtn_UP'),
                             chatButtonGui.find('**/CloseBtn_DN'),
                             chatButtonGui.find('**/CloseBtn_Rllvr'),