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