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


Python MinigameGlobals.generateDebugARGPhrase方法代码示例

本文整理汇总了Python中MinigameGlobals.generateDebugARGPhrase方法的典型用法代码示例。如果您正苦于以下问题:Python MinigameGlobals.generateDebugARGPhrase方法的具体用法?Python MinigameGlobals.generateDebugARGPhrase怎么用?Python MinigameGlobals.generateDebugARGPhrase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MinigameGlobals的用法示例。


在下文中一共展示了MinigameGlobals.generateDebugARGPhrase方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: enterShowScores

# 需要导入模块: import MinigameGlobals [as 别名]
# 或者: from MinigameGlobals import generateDebugARGPhrase [as 别名]
    def enterShowScores(self):
        self.notify.debug('enterShowScores')
        lerpTrack = Parallel()
        lerpDur = 0.5
        lerpTrack.append(Parallel(LerpPosInterval(self.goalBar, lerpDur, Point3(0, 0, -.6), blendType='easeInOut'), LerpScaleInterval(self.goalBar, lerpDur, Vec3(self.goalBar.getScale()) * 2.0, blendType='easeInOut')))
        tY = 0.6
        bY = -.05
        lX = -.5
        cX = 0
        rX = 0.5
        scorePanelLocs = (((cX, bY),),
         ((lX, bY), (rX, bY)),
         ((cX, tY), (lX, bY), (rX, bY)),
         ((lX, tY),
          (rX, tY),
          (lX, bY),
          (rX, bY)))
        scorePanelLocs = scorePanelLocs[self.numPlayers - 1]
        for i in xrange(self.numPlayers):
            panel = self.scorePanels[i]
            pos = scorePanelLocs[i]
            panel.wrtReparentTo(aspect2d)
            lerpTrack.append(Parallel(LerpPosInterval(panel, lerpDur, Point3(pos[0], 0, pos[1]), blendType='easeInOut'), LerpScaleInterval(panel, lerpDur, Vec3(panel.getScale()) * 2.0, blendType='easeInOut')))

        self.showScoreTrack = Parallel(lerpTrack, Sequence(Wait(MazeGameGlobals.SHOWSCORES_DURATION), Func(self.gameOver)))
        self.showScoreTrack.start()

        #For the Alpha Blueprint ARG
        if config.GetBool('want-blueprint4-ARG', False):
            MinigameGlobals.generateDebugARGPhrase()
开发者ID:AdrianF98,项目名称:Toontown-Rewritten,代码行数:32,代码来源:DistributedMazeGame.py

示例2: setEveryoneDone

# 需要导入模块: import MinigameGlobals [as 别名]
# 或者: from MinigameGlobals import generateDebugARGPhrase [as 别名]
    def setEveryoneDone(self):
        if not self.hasLocalToon:
            return
        if self.gameFSM.getCurrentState().getName() != "play":
            self.notify.warning("ignoring setEveryoneDone msg")
            return
        self.notify.debug("setEveryoneDone")

        def endGame(task, self=self):
            if not CatchGameGlobals.EndlessGame:
                self.gameOver()
            return Task.done

        self.notify.debug("num fruits: %s" % self.numFruits)
        self.notify.debug("num catches: %s" % self.fruitsCaught)
        self.timer.hide()

        # For the Alpha Blueprint ARG
        if base.config.GetBool("want-blueprint4-ARG", False):
            MinigameGlobals.generateDebugARGPhrase()

        if self.fruitsCaught >= self.numFruits:
            self.notify.debug("perfect game!")
            perfectTextSubnode = hidden.attachNewNode(self.__genText(TTLocalizer.CatchGamePerfect))
            perfectText = hidden.attachNewNode("perfectText")
            perfectTextSubnode.reparentTo(perfectText)
            frame = self.__textGen.getCardActual()
            offsetY = -abs(frame[2] + frame[3]) / 2.0
            perfectTextSubnode.setPos(0, 0, offsetY)
            perfectText.setColor(1, 0.1, 0.1, 1)

            def fadeFunc(t, text=perfectText):
                text.setColorScale(1, 1, 1, t)

            def destroyText(text=perfectText):
                text.removeNode()

            textTrack = Sequence(
                Func(perfectText.reparentTo, aspect2d),
                Parallel(
                    LerpScaleInterval(perfectText, duration=0.5, scale=0.3, startScale=0.0),
                    LerpFunctionInterval(fadeFunc, fromData=0.0, toData=1.0, duration=0.5),
                ),
                Wait(2.0),
                Parallel(
                    LerpScaleInterval(perfectText, duration=0.5, scale=1.0),
                    LerpFunctionInterval(fadeFunc, fromData=1.0, toData=0.0, duration=0.5, blendType="easeIn"),
                ),
                Func(destroyText),
                WaitInterval(0.5),
                Func(endGame, None),
            )
            soundTrack = SoundInterval(self.sndPerfect)
            self.perfectIval = Parallel(textTrack, soundTrack)
            self.perfectIval.start()
        else:
            taskMgr.doMethodLater(1, endGame, self.EndGameTaskName)
        return
开发者ID:XamarinDeveloper,项目名称:src,代码行数:60,代码来源:DistributedCatchGame.py


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