当前位置: 首页>>代码示例>>Python>>正文


Python DistributedMinigame.onstage方法代码示例

本文整理汇总了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()
开发者ID:ponyboy837,项目名称:Toontown-2003-Server,代码行数:36,代码来源:DistributedCogThiefGame.py

示例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
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leaked-Source,代码行数:36,代码来源:DistributedCogThiefGame.py


注:本文中的toontown.minigame.DistributedMinigame.DistributedMinigame.onstage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。