当前位置: 首页>>代码示例>>Python>>正文


Python DistCogdoLevelGame.DistCogdoLevelGame类代码示例

本文整理汇总了Python中toontown.cogdominium.DistCogdoLevelGame.DistCogdoLevelGame的典型用法代码示例。如果您正苦于以下问题:Python DistCogdoLevelGame类的具体用法?Python DistCogdoLevelGame怎么用?Python DistCogdoLevelGame使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了DistCogdoLevelGame类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: privGotSpec

 def privGotSpec(self, levelSpec):
     DistCogdoLevelGame.privGotSpec(self, levelSpec)
     levelMgr = self.getEntity(LevelConstants.LevelMgrEntId)
     self.endVault = levelMgr.geom
     self.endVault.reparentTo(self.geomRoot)
     self.endVault.findAllMatches('**/MagnetArms').detach()
     self.endVault.findAllMatches('**/Safes').detach()
     self.endVault.findAllMatches('**/MagnetControlsAll').detach()
     cn = self.endVault.find('**/wallsCollision').node()
     cn.setIntoCollideMask(OTPGlobals.WallBitmask | ToontownGlobals.PieBitmask | PM.BitMask32.lowerOn(3) << 21)
     walls = self.endVault.find('**/RollUpFrameCillison')
     walls.detachNode()
     self.evWalls = self.replaceCollisionPolysWithPlanes(walls)
     self.evWalls.reparentTo(self.endVault)
     self.evWalls.stash()
     floor = self.endVault.find('**/EndVaultFloorCollision')
     floor.detachNode()
     self.evFloor = self.replaceCollisionPolysWithPlanes(floor)
     self.evFloor.reparentTo(self.endVault)
     self.evFloor.setName('floor')
     plane = PM.CollisionPlane(PM.Plane(PM.Vec3(0, 0, 1), PM.Point3(0, 0, -50)))
     planeNode = PM.CollisionNode('dropPlane')
     planeNode.addSolid(plane)
     planeNode.setCollideMask(ToontownGlobals.PieBitmask)
     self.geomRoot.attachNewNode(planeNode)
开发者ID:MasterLoopyBM,项目名称:c0d3,代码行数:25,代码来源:DistCogdoCraneGame.py

示例2: exitLoaded

 def exitLoaded(self):
     self.fnp.removeNode()
     self.physicsMgr.clearLinearForces()
     self.geomRoot.removeNode()
     self._gravityForce = None
     self._gravityForceNode = None
     DistCogdoLevelGame.exitLoaded(self)
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leak,代码行数:7,代码来源:DistCogdoCraneGame.py

示例3: enterGame

 def enterGame(self):
     DistCogdoLevelGame.enterGame(self)
     self._physicsTask = taskMgr.add(self._doPhysics, self.uniqueName('physics'), priority=25)
     self.evWalls.stash()
     self._startTimer()
     if __dev__:
         self.accept(self._durationChangedEvent, self._startTimer)
开发者ID:MasterLoopyBM,项目名称:c0d3,代码行数:7,代码来源:DistCogdoCraneGame.py

示例4: enterLoaded

 def enterLoaded(self):
     DistCogdoLevelGame.enterLoaded(self)
     self.lightning = loader.loadModel('phase_10/models/cogHQ/CBLightning.bam')
     self.magnet = loader.loadModel('phase_10/models/cogHQ/CBMagnet.bam')
     self.craneArm = loader.loadModel('phase_10/models/cogHQ/CBCraneArm.bam')
     self.controls = loader.loadModel('phase_10/models/cogHQ/CBCraneControls.bam')
     self.stick = loader.loadModel('phase_10/models/cogHQ/CBCraneStick.bam')
     self.cableTex = self.craneArm.findTexture('MagnetControl')
     self.moneyBag = loader.loadModel('phase_10/models/cashbotHQ/MoneyBag')
     self.geomRoot = PM.NodePath('geom')
     self.sceneRoot = self.geomRoot.attachNewNode('sceneRoot')
     self.sceneRoot.setPos(35.84, -115.46, 6.46)
     self.physicsMgr = PM.PhysicsManager()
     integrator = PM.LinearEulerIntegrator()
     self.physicsMgr.attachLinearIntegrator(integrator)
     fn = PM.ForceNode('gravity')
     self.fnp = self.geomRoot.attachNewNode(fn)
     gravity = PM.LinearVectorForce(0, 0, GameConsts.Settings.Gravity.get())
     fn.addForce(gravity)
     self.physicsMgr.addLinearForce(gravity)
     self._gravityForce = gravity
     self._gravityForceNode = fn
开发者ID:MasterLoopyBM,项目名称:c0d3,代码行数:22,代码来源:DistCogdoCraneGame.py

示例5: disable

 def disable(self):
     self.timer.destroy()
     self.timer = None
     DistCogdoLevelGame.disable(self)
     return
开发者ID:MasterLoopyBM,项目名称:c0d3,代码行数:5,代码来源:DistCogdoCraneGame.py

示例6: announceGenerate

 def announceGenerate(self):
     DistCogdoLevelGame.announceGenerate(self)
     self.timer = ToontownTimer.ToontownTimer()
     self.timer.stash()
     if __dev__:
         self._durationChangedEvent = self.uniqueName('durationChanged')
开发者ID:MasterLoopyBM,项目名称:c0d3,代码行数:6,代码来源:DistCogdoCraneGame.py

示例7: __init__

 def __init__(self, cr):
     DistCogdoLevelGame.__init__(self, cr)
     self.cranes = {}
     self.moneyBags = {}
开发者ID:MasterLoopyBM,项目名称:c0d3,代码行数:4,代码来源:DistCogdoCraneGame.py

示例8: enterFinish

 def enterFinish(self):
     DistCogdoLevelGame.enterFinish(self)
     timeLeft = 10 - (globalClock.getRealTime() - self.getFinishTime())
     self.timer.setTime(timeLeft)
     self.timer.countdown(timeLeft, self.timerExpired)
     self.timer.unstash()
开发者ID:MasterLoopyBM,项目名称:c0d3,代码行数:6,代码来源:DistCogdoCraneGame.py

示例9: exitGame

 def exitGame(self):
     if __dev__:
         self.ignore(self._durationChangedEvent)
     DistCogdoLevelGame.exitGame(self)
     self._physicsTask.remove()
开发者ID:MasterLoopyBM,项目名称:c0d3,代码行数:5,代码来源:DistCogdoCraneGame.py

示例10: enterVisible

 def enterVisible(self):
     DistCogdoLevelGame.enterVisible(self)
     self.geomRoot.reparentTo(render)
开发者ID:MasterLoopyBM,项目名称:c0d3,代码行数:3,代码来源:DistCogdoCraneGame.py

示例11: enterGame

 def enterGame(self):
     DistCogdoLevelGame.enterGame(self)
     timeLeft = Consts.GameDuration.get() - (globalClock.getRealTime() - self.getStartTime())
     self.timer.setTime(timeLeft)
     self.timer.countdown(timeLeft, self.timerExpired)
     self.timer.unstash()
开发者ID:BmanGames,项目名称:ToontownStride,代码行数:6,代码来源:DistCogdoBoardroomGame.py

示例12: announceGenerate

 def announceGenerate(self):
     DistCogdoLevelGame.announceGenerate(self)
     self.timer = ToontownTimer.ToontownTimer()
     self.timer.setScale(Consts.Settings.TimerScale.get())
     self.timer.stash()
开发者ID:BmanGames,项目名称:ToontownStride,代码行数:5,代码来源:DistCogdoBoardroomGame.py

示例13: __init__

 def __init__(self, cr):
     DistCogdoLevelGame.__init__(self, cr)
开发者ID:BmanGames,项目名称:ToontownStride,代码行数:2,代码来源:DistCogdoBoardroomGame.py

示例14: announceGenerate

 def announceGenerate(self):
     DistCogdoLevelGame.announceGenerate(self)
     self.timer = ToontownTimer.ToontownTimer()
     self.timer.stash()
开发者ID:Teku16,项目名称:Toontown-Crystal-Master,代码行数:4,代码来源:DistCogdoCraneGame.py

示例15: exitGame

 def exitGame(self):
     DistCogdoLevelGame.exitGame(self)
     self._physicsTask.remove()
开发者ID:Teku16,项目名称:Toontown-Crystal-Master,代码行数:3,代码来源:DistCogdoCraneGame.py


注:本文中的toontown.cogdominium.DistCogdoLevelGame.DistCogdoLevelGame类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。