本文整理汇总了Python中direct.interval.MetaInterval.Parallel.setDoneEvent方法的典型用法代码示例。如果您正苦于以下问题:Python Parallel.setDoneEvent方法的具体用法?Python Parallel.setDoneEvent怎么用?Python Parallel.setDoneEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类direct.interval.MetaInterval.Parallel
的用法示例。
在下文中一共展示了Parallel.setDoneEvent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: animateArrival
# 需要导入模块: from direct.interval.MetaInterval import Parallel [as 别名]
# 或者: from direct.interval.MetaInterval.Parallel import setDoneEvent [as 别名]
def animateArrival(self):
"""
Cheesy animation introducing viewer to the DESK and TYPEWRITER
:return:
"""
camMoveInterval = LerpPosInterval(self.base.camera, 2, self.cameraTarget)
camHprInterval = LerpHprInterval(self.base.camera, 2, self.cameraHprTarget)
dropKeyboardInterval = LerpPosInterval(self.typewriterNP, 2,
self.typewriterTarget,
startPos=self.typewriterStart,
blendType='easeOut')
sequence = Parallel(camMoveInterval, camHprInterval, dropKeyboardInterval)
sequence.setDoneEvent('arrivalFinished')
def arrivalFinished():
self.activateTypewriter()
self.base.ignore('enter')
self.base.ignore('esc')
self.base.accept('arrivalFinished', arrivalFinished)
sequence.start()
# for the impatient...
def cancelStartupSequence():
sequence.finish()
self.base.acceptOnce('enter', cancelStartupSequence)
self.base.acceptOnce('esc', cancelStartupSequence)