def onstage(self):
     self.notify.debug('onstage')
     DistributedMinigame.onstage(self)
     self.ground.reparentTo(render)
     self.scorePanels = []
     camera.reparentTo(render)
     camera.setPosHpr(*self.CameraPosHpr)
     lt = toonbase.localToon
     lt.reparentTo(render)
     self._DistributedCatchGame__placeToon(self.localAvId)
     lt.setSpeed(0, 0)
     toonSD = self.toonSDs[self.localAvId]
     toonSD.enter()
     toonSD.fsm.request('normal')
     self.orthoWalk.stop()
     radius = 0.69999999999999996
     handler = CollisionHandlerEvent()
     handler.setInPattern('ltCatch%in')
     self.ltLegsCollNode = CollisionNode('catchLegsCollNode')
     self.ltLegsCollNode.setCollideMask(ToontownGlobals.CatchGameBitmask)
     self.ltHeadCollNode = CollisionNode('catchHeadCollNode')
     self.ltHeadCollNode.setCollideMask(ToontownGlobals.CatchGameBitmask)
     self.ltLHandCollNode = CollisionNode('catchLHandCollNode')
     self.ltLHandCollNode.setCollideMask(ToontownGlobals.CatchGameBitmask)
     self.ltRHandCollNode = CollisionNode('catchRHandCollNode')
     self.ltRHandCollNode.setCollideMask(ToontownGlobals.CatchGameBitmask)
     lt.cTrav.addCollider(self.ltLegsCollNode, handler)
     lt.cTrav.addCollider(self.ltHeadCollNode, handler)
     lt.cTrav.addCollider(self.ltLHandCollNode, handler)
     lt.cTrav.addCollider(self.ltRHandCollNode, handler)
     legsCollNodepath = lt.attachNewNode(self.ltLegsCollNode)
     legsCollNodepath.hide()
     head = toonbase.localToon.getHeadParts().getPath(2)
     headCollNodepath = head.attachNewNode(self.ltHeadCollNode)
     headCollNodepath.hide()
     lHand = toonbase.localToon.getLeftHands()[0]
     lHandCollNodepath = lHand.attachNewNode(self.ltLHandCollNode)
     lHandCollNodepath.hide()
     rHand = toonbase.localToon.getRightHands()[0]
     rHandCollNodepath = rHand.attachNewNode(self.ltRHandCollNode)
     rHandCollNodepath.hide()
     if self.ShowToonSpheres:
         legsCollNodepath.show()
         headCollNodepath.show()
         lHandCollNodepath.show()
         rHandCollNodepath.show()
     
     self.ltLegsCollNode.addSolid(CollisionSphere(0, 0, radius, radius))
     self.ltHeadCollNode.addSolid(CollisionSphere(0, 0, 0, radius))
     self.ltLHandCollNode.addSolid(CollisionSphere(0, 0, 0, 2 * radius / 3.0))
     self.ltRHandCollNode.addSolid(CollisionSphere(0, 0, 0, 2 * radius / 3.0))
     self.toonCollNodes = [
         self.ltLegsCollNode,
         self.ltHeadCollNode,
         self.ltLHandCollNode,
         self.ltRHandCollNode]
     if self.PredictiveSmoothing:
         DistributedSmoothNode.activateSmoothing(1, 1)
     
     self.introMovie.play()
コード例 #2
0
 def offstage(self):
     self.notify.debug('offstage')
     DistributedSmoothNode.activateSmoothing(1, 0)
     NametagGlobals.setMasterArrowsOn(0)
     DistributedMinigame.offstage(self)
     self.sky.reparentTo(hidden)
     self.ground.reparentTo(hidden)
     base.camLens.setFar(ToontownGlobals.DefaultCameraFar)
     self.itText.hide()
コード例 #3
0
 def offstage(self):
     self.notify.debug('offstage')
     DistributedSmoothNode.activateSmoothing(1, 0)
     NametagGlobals.setMasterArrowsOn(0)
     DistributedMinigame.offstage(self)
     self.sky.reparentTo(hidden)
     self.ground.reparentTo(hidden)
     base.camLens.setFar(ToontownGlobals.DefaultCameraFar)
     self.itText.hide()
コード例 #4
0
 def onstage(self):
     self.notify.debug('onstage')
     DistributedMinigame.onstage(self)
     self.ground.reparentTo(render)
     self.sky.reparentTo(render)
     myPos = self.avIdList.index(self.localAvId)
     toonbase.localToon.setPosHpr(*self.initialPositions[myPos])
     toonbase.localToon.reparentTo(render)
     toonbase.localToon.loop('neutral')
     camera.reparentTo(render)
     camera.setPosHpr(0, -24, 16, 0, -30, 0)
     base.camLens.setFar(450.0)
     base.transitions.irisIn(0.40000000000000002)
     NametagGlobals.setMasterArrowsOn(1)
     DistributedSmoothNode.activateSmoothing(1, 1)
     self.IT = None
コード例 #5
0
 def onstage(self):
     self.notify.debug('onstage')
     DistributedMinigame.onstage(self)
     self.ground.reparentTo(render)
     self.sky.reparentTo(render)
     myPos = self.avIdList.index(self.localAvId)
     toonbase.localToon.setPosHpr(*self.initialPositions[myPos])
     toonbase.localToon.reparentTo(render)
     toonbase.localToon.loop('neutral')
     camera.reparentTo(render)
     camera.setPosHpr(0, -24, 16, 0, -30, 0)
     base.camLens.setFar(450.0)
     base.transitions.irisIn(0.40000000000000002)
     NametagGlobals.setMasterArrowsOn(1)
     DistributedSmoothNode.activateSmoothing(1, 1)
     self.IT = None
 def offstage(self):
     self.notify.debug('offstage')
     DistributedSmoothNode.activateSmoothing(1, 0)
     self.introMovie.finish()
     for avId in self.avIdList:
         self.toonSDs[avId].exit()
     
     self.hidePosts()
     self.hideDropGrid()
     for collNode in self.toonCollNodes:
         while collNode.getNumSolids():
             collNode.removeSolid(0)
         toonbase.localToon.cTrav.removeCollider(collNode)
     
     del self.toonCollNodes
     for panel in self.scorePanels:
         panel.cleanup()
     
     del self.scorePanels
     self.ground.reparentTo(hidden)
     DistributedMinigame.offstage(self)