本文整理汇总了Python中CogdoMazePlayer.CogdoMazePlayer.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python CogdoMazePlayer.__init__方法的具体用法?Python CogdoMazePlayer.__init__怎么用?Python CogdoMazePlayer.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CogdoMazePlayer.CogdoMazePlayer
的用法示例。
在下文中一共展示了CogdoMazePlayer.__init__方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from CogdoMazePlayer import CogdoMazePlayer [as 别名]
# 或者: from CogdoMazePlayer.CogdoMazePlayer import __init__ [as 别名]
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)