當前位置: 首頁>>代碼示例>>Python>>正文


Python ResistanceChat.decodeId方法代碼示例

本文整理匯總了Python中toontown.chat.ResistanceChat.decodeId方法的典型用法代碼示例。如果您正苦於以下問題:Python ResistanceChat.decodeId方法的具體用法?Python ResistanceChat.decodeId怎麽用?Python ResistanceChat.decodeId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在toontown.chat.ResistanceChat的用法示例。


在下文中一共展示了ResistanceChat.decodeId方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: enterEpilogue

# 需要導入模塊: from toontown.chat import ResistanceChat [as 別名]
# 或者: from toontown.chat.ResistanceChat import decodeId [as 別名]
 def enterEpilogue(self):
     self.cleanupIntervals()
     self.clearChat()
     self.resistanceToon.clearChat()
     self.stash()
     self.stopAnimate()
     self.controlToons()
     self.__showResistanceToon(False)
     self.resistanceToon.setPosHpr(*ToontownGlobals.CashbotBossBattleThreePosHpr)
     self.resistanceToon.loop('neutral')
     self.__arrangeToonsAroundResistanceToon()
     base.camera.reparentTo(render)
     base.camera.setPos(self.resistanceToon, -9, 12, 6)
     base.camera.lookAt(self.resistanceToon, 0, 0, 3)
     intervalName = 'EpilogueMovie'
     text = ResistanceChat.getChatText(self.rewardId)
     menuIndex, itemIndex = ResistanceChat.decodeId(self.rewardId)
     value = ResistanceChat.getItemValue(self.rewardId)
     if menuIndex == ResistanceChat.RESISTANCE_TOONUP:
         if value == -1:
             instructions = TTLocalizer.ResistanceToonToonupAllInstructions
         else:
             instructions = TTLocalizer.ResistanceToonToonupInstructions % value
     elif menuIndex == ResistanceChat.RESISTANCE_MONEY:
         if value == -1:
             instructions = TTLocalizer.ResistanceToonMoneyAllInstructions
         else:
             instructions = TTLocalizer.ResistanceToonMoneyInstructions % value
     elif menuIndex == ResistanceChat.RESISTANCE_RESTOCK:
         if value == -1:
             instructions = TTLocalizer.ResistanceToonRestockAllInstructions
         else:
             trackName = TTLocalizer.BattleGlobalTracks[value]
             instructions = TTLocalizer.ResistanceToonRestockInstructions % trackName
     elif menuIndex == ResistanceChat.RESISTANCE_MERITS:
         if value == -1:
             instructions = TTLocalizer.ResistanceToonMeritsAllInstructions
         else:
             instructions = TTLocalizer.ResistanceToonMeritsInstructions % TTLocalizer.RewardPanelMeritBarLabels[value]
     elif menuIndex == ResistanceChat.RESISTANCE_TICKETS:
         instructions = TTLocalizer.ResistanceToonTicketsInstructions % value
     speech = TTLocalizer.ResistanceToonCongratulations % (text, instructions)
     speech = self.__talkAboutPromotion(speech)
     self.resistanceToon.setLocalPageChat(speech, 0)
     self.accept('nextChatPage', self.__epilogueChatNext)
     self.accept('doneChatPage', self.__epilogueChatDone)
     base.playMusic(self.epilogueMusic, looping=1, volume=0.9)
開發者ID:BmanGames,項目名稱:ToontownStride,代碼行數:49,代碼來源:DistributedCashbotBoss.py


注:本文中的toontown.chat.ResistanceChat.decodeId方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。