本文整理汇总了Python中CogdoMazePlayer.CogdoMazePlayer类的典型用法代码示例。如果您正苦于以下问题:Python CogdoMazePlayer类的具体用法?Python CogdoMazePlayer怎么用?Python CogdoMazePlayer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CogdoMazePlayer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: removeGag
def removeGag(self):
if self.equippedGag is None:
return
CogdoMazePlayer.removeGag(self)
self.throwPending = False
messenger.send(Globals.WaterCoolerShowEventName, [])
return
示例2: equipGag
def equipGag(self):
CogdoMazePlayer.equipGag(self)
self._waterCoolerFillSfx.play()
messenger.send(Globals.WaterCoolerHideEventName, [])
if not self.hints['throw']:
self._guiMgr.setMessage(TTLocalizer.CogdoMazeThrowHint)
self.hints['throw'] = True
示例3: __init__
def __init__(self, id, toon, game, guiMgr):
CogdoMazePlayer.__init__(self, id, toon)
self.disableGagCollision()
self.game = game
self.maze = self.game.maze
self._guiMgr = guiMgr
self.cameraMgr = CogdoMazeCameraManager(self.toon, self.maze, camera, render)
self._proximityRadius = self.maze.cellWidth * Globals.CameraRemoteToonRadius
orthoDrive = OrthoDrive(Globals.ToonRunSpeed, maxFrameMove=self.maze.cellWidth / 2, customCollisionCallback=self.maze.doOrthoCollisions, wantSound=True)
self.orthoWalk = OrthoWalk(orthoDrive)
self._audioMgr = base.cogdoGameAudioMgr
self._getMemoSfx = self._audioMgr.createSfx('getMemo', source=self.toon)
self._waterCoolerFillSfx = self._audioMgr.createSfx('waterCoolerFill', source=self.toon)
self._hitByDropSfx = self._audioMgr.createSfx('toonHitByDrop', source=self.toon)
self._winSfx = self._audioMgr.createSfx('win')
self._loseSfx = self._audioMgr.createSfx('lose')
self.enabled = False
self.pickupCount = 0
self.numEntered = 0
self.throwPending = False
self.coolDownAfterHitInterval = Sequence(Wait(Globals.HitCooldownTime), Func(self.setInvulnerable, False), name='coolDownAfterHitInterval-%i' % self.toon.doId)
self.invulnerable = False
self.gagHandler = CollisionHandlerEvent()
self.gagHandler.addInPattern('%fn-into-%in')
self.exited = False
self.hints = {'find': False,
'throw': False,
'squashed': False,
'boss': False,
'minion': False}
self.accept('control', self.controlKeyPressed)
示例4: enterDone
def enterDone(self):
CogdoMazePlayer.enterDone(self)
self._guiMgr.hideQuestArrow()
self.ignore('control')
self._guiMgr.setMessage('')
if self.exited == False:
self.lostMemos()
示例5: hitByDrop
def hitByDrop(self):
if self.equippedGag is not None and not self.hints['squashed']:
self._guiMgr.setMessageTemporary(TTLocalizer.CogdoMazeSquashHint, Globals.HintTimeout)
self.hints['squashed'] = True
self._hitByDropSfx.play()
CogdoMazePlayer.hitByDrop(self)
return
示例6: destroy
def destroy(self):
self.toon.showName()
self.ignoreAll()
self.coolDownAfterHitInterval.clearToInitial()
del self.coolDownAfterHitInterval
del self._getMemoSfx
del self._waterCoolerFillSfx
del self._hitByDropSfx
del self._winSfx
self.orthoWalk.stop()
self.orthoWalk.destroy()
del self.orthoWalk
CogdoMazePlayer.destroy(self)
示例7: createThrowGag
def createThrowGag(self, gag):
throwGag = CogdoMazePlayer.createThrowGag(self, gag)
collSphere = CollisionSphere(0, 0, 0, 0.5)
collSphere.setTangible(0)
name = Globals.GagCollisionName
collNode = CollisionNode(name)
collNode.setFromCollideMask(ToontownGlobals.PieBitmask)
collNode.addSolid(collSphere)
colNp = throwGag.attachNewNode(collNode)
base.cTrav.addCollider(colNp, self.gagHandler)
return throwGag
示例8: showToonThrowingGag
def showToonThrowingGag(self, heading, pos):
self._guiMgr.clearMessage()
return CogdoMazePlayer.showToonThrowingGag(self, heading, pos)
示例9: exitOff
def exitOff(self):
CogdoMazePlayer.exitOff(self)
self.toon.hideName()
示例10: exitHit
def exitHit(self):
CogdoMazePlayer.exitHit(self)
self.coolDownAfterHitInterval.clearToInitial()
self.coolDownAfterHitInterval.start()
示例11: enterHit
def enterHit(self, elapsedTime = 0.0):
CogdoMazePlayer.enterHit(self, elapsedTime)
self.setInvulnerable(True)
示例12: exitNormal
def exitNormal(self):
CogdoMazePlayer.exitNormal(self)
self.orthoWalk.stop()
示例13: enterNormal
def enterNormal(self):
CogdoMazePlayer.enterNormal(self)
self.orthoWalk.start()
示例14: exitReady
def exitReady(self):
CogdoMazePlayer.enterReady(self)
示例15: enterReady
def enterReady(self):
CogdoMazePlayer.enterReady(self)
self.cameraMgr.enable()