本文整理汇总了Python中toontown.coghq.CogDisguiseGlobals.getPartCount方法的典型用法代码示例。如果您正苦于以下问题:Python CogDisguiseGlobals.getPartCount方法的具体用法?Python CogDisguiseGlobals.getPartCount怎么用?Python CogDisguiseGlobals.getPartCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类toontown.coghq.CogDisguiseGlobals
的用法示例。
在下文中一共展示了CogDisguiseGlobals.getPartCount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: update
# 需要导入模块: from toontown.coghq import CogDisguiseGlobals [as 别名]
# 或者: from toontown.coghq.CogDisguiseGlobals import getPartCount [as 别名]
def update(self):
if not CogDisguiseGlobals.isSuitComplete(base.localAvatar.cogParts, self.deptIndex):
self.progressBar['text'] = '%s %s' % (
CogDisguiseGlobals.getPartCountAsString(base.localAvatar.cogParts, self.deptIndex),
TTLocalizer.DisguiseParts)
self.progressBar['range'] = CogDisguiseGlobals.PartsPerSuit[self.deptIndex]
self.progressBar['value'] = CogDisguiseGlobals.getPartCount(base.localAvatar.cogParts, self.deptIndex)
return
promoStatus = base.localAvatar.promotionStatus[self.deptIndex]
if promoStatus != ToontownGlobals.PendingPromotion:
totalMerits = CogDisguiseGlobals.getTotalMerits(base.localAvatar, self.deptIndex)
merits = base.localAvatar.cogMerits[self.deptIndex]
self.progressBar['range'] = totalMerits
self.progressBar['value'] = merits
self.progressBar['text'] = '%s/%s %s' % (
merits, totalMerits, TTLocalizer.RewardPanelMeritBarLabels[self.deptIndex])
else:
self.progressBar['range'] = 1
self.progressBar['value'] = 1
maxSuitLevel = (SuitDNA.levelsPerSuit - 1) + (SuitDNA.suitsPerDept - 1)
if base.localAvatar.cogLevels[self.deptIndex] == maxSuitLevel:
self.progressBar['text'] = TTLocalizer.RewardPanelMeritsMaxed
else:
self.progressBar['text'] = TTLocalizer.RewardPanelPromotionPending