本文整理汇总了Python中toontown.minigame.DistributedMinigame.DistributedMinigame.onstage方法的典型用法代码示例。如果您正苦于以下问题:Python DistributedMinigame.onstage方法的具体用法?Python DistributedMinigame.onstage怎么用?Python DistributedMinigame.onstage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类toontown.minigame.DistributedMinigame.DistributedMinigame
的用法示例。
在下文中一共展示了DistributedMinigame.onstage方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: onstage
# 需要导入模块: from toontown.minigame.DistributedMinigame import DistributedMinigame [as 别名]
# 或者: from toontown.minigame.DistributedMinigame.DistributedMinigame import onstage [as 别名]
def onstage(self):
self.notify.debug("onstage")
DistributedMinigame.onstage(self)
self.gameBoard.reparentTo(render)
lt = base.localAvatar
lt.reparentTo(render)
self._DistributedCogThiefGame__placeToon(self.localAvId)
lt.setSpeed(0, 0)
self.moveCameraToTop()
toonSD = self.toonSDs[self.localAvId]
toonSD.enter()
toonSD.fsm.request("normal")
self.stopGameWalk()
for cogIndex in xrange(self.getNumCogs()):
suit = self.cogInfo[cogIndex]["suit"].suit
pos = self.cogInfo[cogIndex]["pos"]
suit.reparentTo(self.gameBoard)
suit.setPos(pos)
for avId in self.avIdList:
self.toonHitTracks[avId] = Wait(0.10000000000000001)
self.toonRNGs = []
for i in xrange(self.numPlayers):
self.toonRNGs.append(RandomNumGen.RandomNumGen(self.randomNumGen))
self.sndTable = {"hitBySuit": [None] * self.numPlayers, "falling": [None] * self.numPlayers}
for i in xrange(self.numPlayers):
self.sndTable["hitBySuit"][i] = base.loadSfx("phase_4/audio/sfx/MG_Tag_C.mp3")
self.sndTable["falling"][i] = base.loadSfx("phase_4/audio/sfx/MG_cannon_whizz.mp3")
base.playMusic(self.music, looping=1, volume=0.80000000000000004)
self.introTrack = self.getIntroTrack()
self.introTrack.start()
示例2: onstage
# 需要导入模块: from toontown.minigame.DistributedMinigame import DistributedMinigame [as 别名]
# 或者: from toontown.minigame.DistributedMinigame.DistributedMinigame import onstage [as 别名]
def onstage(self):
self.notify.debug('onstage')
DistributedMinigame.onstage(self)
self.gameBoard.reparentTo(render)
self.sky.reparentTo(render)
lt = base.localAvatar
lt.reparentTo(render)
self.__placeToon(self.localAvId)
lt.setSpeed(0, 0)
toonSD = self.toonSDs[self.localAvId]
toonSD.enter()
toonSD.fsm.request('normal')
self.stopGameWalk()
for cogIndex in xrange(self.getNumCogs()):
suit = self.cogInfo[cogIndex]['suit'].suit
pos = self.cogInfo[cogIndex]['pos']
suit.reparentTo(self.gameBoard)
suit.setPos(pos)
for avId in self.avIdList:
self.toonHitTracks[avId] = Wait(0.1)
self.toonRNGs = []
for i in xrange(self.numPlayers):
self.toonRNGs.append(RandomNumGen.RandomNumGen(self.randomNumGen))
self.sndTable = {'hitBySuit': [None] * self.numPlayers,
'falling': [None] * self.numPlayers}
for i in xrange(self.numPlayers):
self.sndTable['hitBySuit'][i] = base.loadSfx('phase_4/audio/sfx/MG_Tag_C.ogg')
self.sndTable['falling'][i] = base.loadSfx('phase_4/audio/sfx/MG_cannon_whizz.ogg')
base.playMusic(self.music, looping=1, volume=0.8)
return