本文整理汇总了Python中toontown.coghq.CogDisguiseGlobals.getTotalParts方法的典型用法代码示例。如果您正苦于以下问题:Python CogDisguiseGlobals.getTotalParts方法的具体用法?Python CogDisguiseGlobals.getTotalParts怎么用?Python CogDisguiseGlobals.getTotalParts使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类toontown.coghq.CogDisguiseGlobals
的用法示例。
在下文中一共展示了CogDisguiseGlobals.getTotalParts方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: doTab
# 需要导入模块: from toontown.coghq import CogDisguiseGlobals [as 别名]
# 或者: from toontown.coghq.CogDisguiseGlobals import getTotalParts [as 别名]
def doTab(self, index):
self.activeTab = index
self.tabs[index].reparentTo(self.pageFrame)
for i in range(len(self.tabs)):
tab = self.tabs[i]
if i == index:
tab['text0_fg'] = (1, 0, 0, 1)
tab['text2_fg'] = (1, 0, 0, 1)
else:
tab['text0_fg'] = (0, 0, 0, 1)
tab['text2_fg'] = (0.5, 0.4, 0.4, 1)
self.bkgd.setColor(DeptColors[index])
self.deptLabel['text'] = (SuitDNA.suitDeptFullnames[SuitDNA.suitDepts[index]],)
cogIndex = base.localAvatar.cogTypes[index] + SuitDNA.suitsPerDept * index
cog = SuitDNA.suitHeadTypes[cogIndex]
self.progressTitle.hide()
if SuitDNA.suitDepts[index] == 'm':
self.progressTitle = self.cogbuckTitle
elif SuitDNA.suitDepts[index] == 'l':
self.progressTitle = self.juryNoticeTitle
elif SuitDNA.suitDepts[index] == 'c':
self.progressTitle = self.stockOptionTitle
else:
self.progressTitle = self.meritTitle
self.progressTitle.show()
self.cogName['text'] = SuitBattleGlobals.SuitAttributes[cog]['name']
cogLevel = base.localAvatar.cogLevels[index]
self.cogLevel['text'] = TTLocalizer.DisguisePageCogLevel % str(cogLevel + 1)
numParts = base.localAvatar.cogParts[index]
numPartsRequired = CogDisguiseGlobals.PartsPerSuit[index]
self.updatePartsDisplay(index, numParts, numPartsRequired)
self.updateMeritBar(index)
self.cogPartRatio['text'] = '%d/%d' % (CogDisguiseGlobals.getTotalParts(numParts), numPartsRequired)