本文整理汇总了Python中pirates.inventory.ItemGlobals.getJumpAnimInfo方法的典型用法代码示例。如果您正苦于以下问题:Python ItemGlobals.getJumpAnimInfo方法的具体用法?Python ItemGlobals.getJumpAnimInfo怎么用?Python ItemGlobals.getJumpAnimInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pirates.inventory.ItemGlobals
的用法示例。
在下文中一共展示了ItemGlobals.getJumpAnimInfo方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: landRun
# 需要导入模块: from pirates.inventory import ItemGlobals [as 别名]
# 或者: from pirates.inventory.ItemGlobals import getJumpAnimInfo [as 别名]
def landRun(self):
self.fsmLock.acquire()
try:
if not self.landRunIval:
animInfo = ItemGlobals.getJumpAnimInfo(self.av.getCurrentWeapon())
startFrame = animInfo[3] + 1
endFrame = startFrame + 5
self.landRunIval = self.av.actorInterval(animInfo[0], startFrame = startFrame, endFrame = endFrame, blendInT = 0.0, blendOutT = 0.14999999999999999)
self.landRunIval.start()
finally:
self.fsmLock.release()
示例2: land
# 需要导入模块: from pirates.inventory import ItemGlobals [as 别名]
# 或者: from pirates.inventory.ItemGlobals import getJumpAnimInfo [as 别名]
def land(self):
self.fsmLock.acquire()
try:
animInfo = ItemGlobals.getJumpAnimInfo(self.av.getCurrentWeapon())
if self.landIval:
self.landIval.finish()
startFrame = animInfo[3]
endFrame = animInfo[4]
self.landIval = self.av.actorInterval(animInfo[0], startFrame = startFrame, endFrame = endFrame, blendInT = 0.0, blendOutT = self.BLENDAMT * 0.5)
self.landIval.start()
finally:
self.fsmLock.release()
示例3: jump
# 需要导入模块: from pirates.inventory import ItemGlobals [as 别名]
# 或者: from pirates.inventory.ItemGlobals import getJumpAnimInfo [as 别名]
def jump(self):
self.fsmLock.acquire()
try:
animInfo = ItemGlobals.getJumpAnimInfo(self.av.getCurrentWeapon())
if self.state == 'Idle':
startFrame = animInfo[1]
endFrame = animInfo[3]
if self.idleJumpIval:
self.idleJumpIval.finish()
self.idleJumpIval = self.av.actorInterval(animInfo[0], startFrame = startFrame, endFrame = endFrame, playRate = 1.5, blendInT = 0.0, blendOutT = self.BLENDAMT * 0.5)
self.idleJumpIval.start()
else:
startFrame = animInfo[2]
endFrame = animInfo[3]
self.av.play(animInfo[0], fromFrame = startFrame, toFrame = endFrame, blendInT = self.BLENDAMT * 0.5, blendOutT = self.BLENDAMT * 0.5)
finally:
self.fsmLock.release()