當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。