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


Python SuitBattleGlobals.getAttacksByType方法代碼示例

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


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

示例1: updateRolloverBind

# 需要導入模塊: from toontown.battle import SuitBattleGlobals [as 別名]
# 或者: from toontown.battle.SuitBattleGlobals import getAttacksByType [as 別名]
    def updateRolloverBind(self):
        if not self.suit:
            return

        attributes = SuitBattleGlobals.SuitAttributes[self.suit.getStyleName()]
        groupAttacks, singleAttacks = SuitBattleGlobals.getAttacksByType(attributes)
        level = self.suit.getLevel()
        info = TTLocalizer.BattleCogPopup % (self.getAttackStrings(groupAttacks, level), self.getAttackStrings(singleAttacks, level))
        
        if TTLocalizer.BattleCogPopupDangerColor in info:
            info = TTLocalizer.BattleCogPopupDanger + info

        self.hoverButton.bind(DGG.ENTER, self.battle.showRolloverFrame, extraArgs=[self, TTLocalizer.BattleHoverCog, info])
開發者ID:BmanGames,項目名稱:ToontownStride,代碼行數:15,代碼來源:TownBattleCogPanel.py

示例2: setPanelStatus

# 需要導入模塊: from toontown.battle import SuitBattleGlobals [as 別名]
# 或者: from toontown.battle.SuitBattleGlobals import getAttacksByType [as 別名]
 def setPanelStatus(self, panel, status):
     index = self.panels.index(panel)
     if status == COG_UNSEEN:
         panel['text'] = TTLocalizer.SuitPageMystery
     elif status == COG_BATTLED:
         suitName = SuitDNA.suitHeadTypes[index]
         suitFullName = SuitBattleGlobals.SuitAttributes[suitName]['name']
         panel['text'] = suitFullName
         if panel.quotaLabel:
             panel.quotaLabel.show()
         else:
             self.addQuotaLabel(panel)
         if panel.head and panel.shadow:
             panel.head.show()
             panel.shadow.show()
         else:
             self.addSuitHead(panel, suitName)
         if base.localAvatar.hasCogSummons(index):
             if panel.summonButton:
                 panel.summonButton.show()
             else:
                 self.addSummonButton(panel)
     elif status == COG_DEFEATED:
         count = str(base.localAvatar.cogCounts[index])
         if base.localAvatar.cogs[index] < COG_COMPLETE1:
             quota = str(COG_QUOTAS[0][index % SuitDNA.suitsPerDept])
         else:
             quota = str(COG_QUOTAS[1][index % SuitDNA.suitsPerDept])
         panel.quotaLabel['text'] = TTLocalizer.SuitPageQuota % (count, quota)
     elif status == COG_COMPLETE1:
         panel['image_color'] = PANEL_COLORS_COMPLETE1[index / SuitDNA.suitsPerDept]
     elif status == COG_COMPLETE2:
         panel['image_color'] = PANEL_COLORS_COMPLETE2[index / SuitDNA.suitsPerDept]
     if status in (COG_DEFEATED, COG_COMPLETE1, COG_COMPLETE2):
         name = SuitDNA.suitHeadTypes[index]
         attributes = SuitBattleGlobals.SuitAttributes[name]
         level = attributes['level']
         groupAttacks, singleAttacks = SuitBattleGlobals.getAttacksByType(attributes)
         info = TTLocalizer.SuitPageAttackFormat % (level + 1, level + 5, self.getAttackStrings(groupAttacks), self.getAttackStrings(singleAttacks))
         
         panel.hoverButton.bind(DGG.ENTER, self.showInfo, extraArgs=[panel, info])
         panel.hoverButton.bind(DGG.EXIT, self.hideInfo)
開發者ID:BmanGames,項目名稱:ToontownStride,代碼行數:44,代碼來源:SuitPage.py


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