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


Python GardenGlobals.getNumberOfFlowerVarieties方法代码示例

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


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

示例1: updatePage

# 需要导入模块: from toontown.estate import GardenGlobals [as 别名]
# 或者: from toontown.estate.GardenGlobals import getNumberOfFlowerVarieties [as 别名]
    def updatePage(self):
        if hasattr(self, "collectedTotal"):
            self.collectedTotal["text"] = TTLocalizer.GardenPageCollectedTotal % (
                len(base.localAvatar.flowerCollection),
                GardenGlobals.getNumberOfFlowerVarieties(),
            )
        if hasattr(self, "shovelBar"):
            shovel = base.localAvatar.shovel
            shovelName = TTLocalizer.ShovelNameDict[shovel]
            curShovelSkill = base.localAvatar.shovelSkill
            maxShovelSkill = GardenGlobals.ShovelAttributes[shovel]["skillPts"]
            if shovel == GardenGlobals.MAX_SHOVELS - 1:
                maxShovelSkill -= 1
            wateringCan = base.localAvatar.wateringCan
            wateringCanName = TTLocalizer.WateringCanNameDict[wateringCan]
            curWateringCanSkill = base.localAvatar.wateringCanSkill
            maxWateringCanSkill = GardenGlobals.WateringCanAttributes[wateringCan]["skillPts"]
            if wateringCan == GardenGlobals.MAX_WATERING_CANS - 1:
                maxWateringCanSkill -= 1
            textToUse = TTLocalizer.GardenPageShovelInfo % (shovelName, curShovelSkill, maxShovelSkill)
            self.shovelBar["text"] = textToUse
            self.shovelBar["value"] = float(curShovelSkill) / float(maxShovelSkill) * self.barLength + self.FUDGE_FACTOR
            textToUse = TTLocalizer.GardenPageWateringCanInfo % (
                wateringCanName,
                curWateringCanSkill,
                maxWateringCanSkill,
            )
            self.wateringCanBar["text"] = textToUse
            self.wateringCanBar["value"] = (
                float(curWateringCanSkill) / float(maxWateringCanSkill) * self.barLength + self.FUDGE_FACTOR
            )
        else:
            print "no shovel bar"
        if self.mode == GardenPage_Collection:
            if hasattr(self, "browser"):
                self.browser.update()
        elif self.mode == GardenPage_Basket:
            if hasattr(self, "picker"):
                newBasketFlower = base.localAvatar.flowerBasket.getFlower()
                self.picker.update(newBasketFlower)
        elif self.mode == GardenPage_Trophy:
            if hasattr(self, "trophies"):
                for trophy in self.trophies:
                    trophy.setLevel(-1)

                for trophyId in base.localAvatar.getGardenTrophies():
                    self.trophies[trophyId].setLevel(trophyId)

        elif self.mode == GardenPage_Specials:
            self.createGardenSpecialsList()
            if not base.cr.playGame.getPlace().getState() == "stickerBook":
                self.specialsPhoto.hide()
开发者ID:BmanGames,项目名称:Toontown-Level-Editor,代码行数:54,代码来源:GardenPage.py

示例2: awardedTrophy

# 需要导入模块: from toontown.estate import GardenGlobals [as 别名]
# 或者: from toontown.estate.GardenGlobals import getNumberOfFlowerVarieties [as 别名]
 def awardedTrophy(self, avId):
     if base.localAvatar.doId == avId:
         base.cr.playGame.getPlace().detectedGardenPlotUse()
         msg = TTLocalizer.GardenTrophyAwarded % (len(base.localAvatar.getFlowerCollection()), GardenGlobals.getNumberOfFlowerVarieties())
         self.awardDialog = TTDialog.TTDialog(style=TTDialog.Acknowledge, text=msg, command=self.closedAwardDialog)
开发者ID:Teku16,项目名称:Toontown-Crystal-Master,代码行数:7,代码来源:DistributedEstate.py


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