当前位置: 首页>>代码示例>>Python>>正文


Python CogDisguiseGlobals.getPartCountAsString方法代码示例

本文整理汇总了Python中toontown.coghq.CogDisguiseGlobals.getPartCountAsString方法的典型用法代码示例。如果您正苦于以下问题:Python CogDisguiseGlobals.getPartCountAsString方法的具体用法?Python CogDisguiseGlobals.getPartCountAsString怎么用?Python CogDisguiseGlobals.getPartCountAsString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在toontown.coghq.CogDisguiseGlobals的用法示例。


在下文中一共展示了CogDisguiseGlobals.getPartCountAsString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: update

# 需要导入模块: from toontown.coghq import CogDisguiseGlobals [as 别名]
# 或者: from toontown.coghq.CogDisguiseGlobals import getPartCountAsString [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
开发者ID:NostalgicTTR,项目名称:Toontown-Infinite-2016-Leak,代码行数:32,代码来源:CogMenuBar.py


注:本文中的toontown.coghq.CogDisguiseGlobals.getPartCountAsString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。