本文整理汇总了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])
示例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)