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


Python GardenGlobals.getFlowerVarietyName方法代码示例

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


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

示例1: handlePicking

# 需要导入模块: from toontown.estate import GardenGlobals [as 别名]
# 或者: from toontown.estate.GardenGlobals import getFlowerVarietyName [as 别名]
 def handlePicking(self):
     messenger.send('wakeup')
     fullName = GardenGlobals.getFlowerVarietyName(self.species, self.variety)
     if self.isWilted():
         self.confirmDialog = TTDialog.TTDialog(style=TTDialog.YesNo, text=TTLocalizer.ConfirmWiltedFlower % {'plant': fullName}, command=self.confirmCallback)
     elif not self.isFruiting():
         self.confirmDialog = TTDialog.TTDialog(style=TTDialog.YesNo, text=TTLocalizer.ConfirmUnbloomingFlower % {'plant': fullName}, command=self.confirmCallback)
     elif base.localAvatar.isFlowerBasketFull():
         self.confirmDialog = TTDialog.TTDialog(style=TTDialog.CancelOnly, text=TTLocalizer.ConfirmBasketFull, command=self.confirmCallback)
     else:
         shovel = base.localAvatar.shovel
         skill = base.localAvatar.shovelSkill
         shovelPower = GardenGlobals.getShovelPower(shovel, skill)
         giveSkillUp = True
         beansRequired = GardenGlobals.getNumBeansRequired(self.species, self.variety)
         if not shovelPower == beansRequired:
             giveSkillUp = False
         if giveSkillUp:
             if skill == GardenGlobals.getMaxShovelSkill():
                 text = (TTLocalizer.ConfirmMaxedSkillFlower % {'plant': fullName},)
             else:
                 text = TTLocalizer.ConfirmSkillupFlower % {'plant': fullName}
             self.confirmDialog = TTDialog.TTDialog(style=TTDialog.YesNo, text=text, command=self.confirmCallback)
         else:
             self.confirmDialog = TTDialog.TTDialog(style=TTDialog.YesNo, text=TTLocalizer.ConfirmNoSkillupFlower % {'plant': fullName}, command=self.confirmCallback)
     self.confirmDialog.show()
     base.localAvatar.setInGardenAction(self)
     base.cr.playGame.getPlace().detectedGardenPlotUse()
开发者ID:frogtongue,项目名称:tonguefrog,代码行数:30,代码来源:DistributedFlower.py

示例2: doResultDialog

# 需要导入模块: from toontown.estate import GardenGlobals [as 别名]
# 或者: from toontown.estate.GardenGlobals import getFlowerVarietyName [as 别名]
 def doResultDialog(self):
     self.startInteraction()
     flowerName = GardenGlobals.getFlowerVarietyName(self.species, self.variety)
     stringToShow = TTLocalizer.getResultPlantedSomethingSentence(flowerName)
     self.resultDialog = TTDialog.TTDialog(
         style=TTDialog.Acknowledge, text=stringToShow, command=self.resultsCallback
     )
开发者ID:BmanGames,项目名称:ToontownStride,代码行数:9,代码来源:DistributedFlower.py


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