本文整理汇总了Python中CogdoFlyingPlayer.CogdoFlyingPlayer.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python CogdoFlyingPlayer.__init__方法的具体用法?Python CogdoFlyingPlayer.__init__怎么用?Python CogdoFlyingPlayer.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CogdoFlyingPlayer.CogdoFlyingPlayer
的用法示例。
在下文中一共展示了CogdoFlyingPlayer.__init__方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from CogdoFlyingPlayer import CogdoFlyingPlayer [as 别名]
# 或者: from CogdoFlyingPlayer.CogdoFlyingPlayer import __init__ [as 别名]
def __init__(self, toon, game, level, guiMgr):
CogdoFlyingPlayer.__init__(self, toon)
self.defaultTransitions = {'Inactive': ['FreeFly', 'Running'],
'FreeFly': ['Inactive',
'OutOfTime',
'Death',
'FlyingUp',
'Running',
'HitWhileFlying',
'InWhirlwind'],
'FlyingUp': ['Inactive',
'OutOfTime',
'Death',
'FreeFly',
'Running',
'HitWhileFlying',
'InWhirlwind'],
'InWhirlwind': ['Inactive',
'OutOfTime',
'Death',
'FreeFly',
'HitWhileFlying'],
'HitWhileFlying': ['Inactive',
'OutOfTime',
'Death',
'FreeFly',
'InWhirlwind'],
'Death': ['Inactive', 'OutOfTime', 'Spawn'],
'Running': ['Inactive',
'OutOfTime',
'FreeFly',
'FlyingUp',
'Refuel',
'WaitingForWin',
'HitWhileRunning'],
'HitWhileRunning': ['Inactive',
'OutOfTime',
'Death',
'Running',
'FreeFly'],
'Spawn': ['Inactive',
'OutOfTime',
'Running',
'WaitingForWin'],
'OutOfTime': ['Inactive', 'Spawn'],
'WaitingForWin': ['Inactive', 'Win'],
'Win': ['Inactive']}
self.game = game
self._level = level
self._guiMgr = guiMgr
self._inputMgr = CogdoFlyingInputManager()
self._cameraMgr = CogdoFlyingCameraManager(camera, render, self, self._level)
self.velocity = Vec3(0.0, 0.0, 0.0)
self.instantaneousVelocity = Vec3(0.0, 0.0, 0.0)
self.controlVelocity = Vec3(0.0, 0.0, 0.0)
self.fanVelocity = Vec3(0.0, 0.0, 0.0)
self.activeFans = []
self.fansStillHavingEffect = []
self.fanIndex2ToonVelocity = {}
self.legalEagleInterestRequest = {}
self.activeWhirlwind = None
self.oldPos = Vec3(0.0, 0.0, 0.0)
self.checkpointPlatform = None
self.isHeadInCeiling = False
self.isToonOnFloor = False
self.fuel = 0.0
self.score = 0
self.postSpawnState = 'Running'
self.didTimeRunOut = False
self.hasPressedCtrlYet = False
self.hasPickedUpFirstPropeller = False
self.surfacePoint = None
self.legalEagleHitting = False
self.propState = None
self.broadcastPeriod = Globals.AI.BroadcastPeriod
self.initSfx()
self.initLocalPlayerIntervals()
self.initCollisions()
self.initOrthoWalker()
self.playerNumber = -1
self.fuel = 0.0
self._guiMgr.setFuel(self.fuel)
self.setCheckpointPlatform(self._level.startPlatform)