当前位置: 首页>>代码示例>>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;未经允许,请勿转载。