本文整理汇总了Python中GardenGlobals.whatCanBePlanted方法的典型用法代码示例。如果您正苦于以下问题:Python GardenGlobals.whatCanBePlanted方法的具体用法?Python GardenGlobals.whatCanBePlanted怎么用?Python GardenGlobals.whatCanBePlanted使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GardenGlobals
的用法示例。
在下文中一共展示了GardenGlobals.whatCanBePlanted方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: plantSomething
# 需要导入模块: import GardenGlobals [as 别名]
# 或者: from GardenGlobals import whatCanBePlanted [as 别名]
def plantSomething(self):
whatCanBePlanted = GardenGlobals.whatCanBePlanted(self.ownerIndex, self.plot)
if whatCanBePlanted == GardenGlobals.INVALID_TYPE:
self.notify.warning('whatCanBePlanted returned INVALID_TYPE for %d %d' % (self.ownerIndex, self.plot))
elif whatCanBePlanted == GardenGlobals.FLOWER_TYPE:
self.popupFlowerPlantingGui()
self.startInteraction()
elif whatCanBePlanted == GardenGlobals.GAG_TREE_TYPE:
self.popupTreePlantingGui()
self.startInteraction()
elif whatCanBePlanted == GardenGlobals.STATUARY_TYPE:
self.popupItemPlantingGui()
self.startInteraction()
示例2: getPlantingText
# 需要导入模块: import GardenGlobals [as 别名]
# 或者: from GardenGlobals import whatCanBePlanted [as 别名]
def getPlantingText(self):
plantText = 'hardcoding'
if self.canBePlanted():
whatCanBePlanted = GardenGlobals.whatCanBePlanted(self.ownerIndex, self.plot)
plantText = TTLocalizer.GardeningPlant
if whatCanBePlanted == GardenGlobals.INVALID_TYPE:
self.notify.warning('whatCanBePlanted returned INVALID_TYPE for %d %d' % (self.ownerIndex, self.plot))
elif whatCanBePlanted == GardenGlobals.FLOWER_TYPE:
plantText = TTLocalizer.GardeningPlantFlower
elif whatCanBePlanted == GardenGlobals.GAG_TREE_TYPE:
plantText = TTLocalizer.GardeningPlantTree
elif whatCanBePlanted == GardenGlobals.STATUARY_TYPE:
plantText = TTLocalizer.GardeningPlantItem
return plantText
示例3: announceGenerate
# 需要导入模块: import GardenGlobals [as 别名]
# 或者: from GardenGlobals import whatCanBePlanted [as 别名]
def announceGenerate(self):
self.plotType = GardenGlobals.whatCanBePlanted(self.ownerIndex, self.plot)
self.stickUp = 0.0
if self.getOwnerId() != localAvatar.doId:
self.defaultModel = None
elif self.plotType == GardenGlobals.FLOWER_TYPE:
self.collSphereRadius = 2.0
self.collSphereOffset = 0.0
self.plotScale = 0.7
self.stickUp = 1.1
elif self.plotType == GardenGlobals.GAG_TREE_TYPE:
self.collSphereRadius = 3.0
self.plotScale = 1.5
self.colorScaler = Vec4(1.0, 1.0, 1.0, 1)
elif self.plotType == GardenGlobals.STATUARY_TYPE:
self.collSphereRadius = 3.0
self.plotScale = 0.075
self.stickUp = -0.0
self.defaultModel = 'phase_5.5/models/estate/garden_slab'
else:
self.collSphereOffset = 0.0
self.notify.debug('announceGenerate')
DistributedLawnDecor.DistributedLawnDecor.announceGenerate(self)
示例4: announceGenerate
# 需要导入模块: import GardenGlobals [as 别名]
# 或者: from GardenGlobals import whatCanBePlanted [as 别名]
def announceGenerate(self):
DistributedLawnDecorAI.announceGenerate(self)
self.plotType = GardenGlobals.whatCanBePlanted(self.ownerIndex, self.plot)
self.__plantingAvId = 0
示例5: stick2Ground
# 需要导入模块: import GardenGlobals [as 别名]
# 或者: from GardenGlobals import whatCanBePlanted [as 别名]
def stick2Ground(self, *args, **kwargs):
plotType = GardenGlobals.whatCanBePlanted(self.ownerIndex, self.plot)
if plotType == GardenGlobals.FLOWER_TYPE:
return
return DistributedLawnDecor.DistributedLawnDecor.stick2Ground(self, *args, **kwargs)