本文整理汇总了Python中toontown.hood.ZoneUtil.isDynamicZone方法的典型用法代码示例。如果您正苦于以下问题:Python ZoneUtil.isDynamicZone方法的具体用法?Python ZoneUtil.isDynamicZone怎么用?Python ZoneUtil.isDynamicZone使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类toontown.hood.ZoneUtil
的用法示例。
在下文中一共展示了ZoneUtil.isDynamicZone方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: enteringARace
# 需要导入模块: from toontown.hood import ZoneUtil [as 别名]
# 或者: from toontown.hood.ZoneUtil import isDynamicZone [as 别名]
def enteringARace(self, status):
if not status['where'] == 'racetrack':
return 0
if ZoneUtil.isDynamicZone(status['zoneId']):
return status['hoodId'] == self.hood.hoodId
else:
return ZoneUtil.getHoodId(status['zoneId']) == self.hood.hoodId
示例2: teleportToShop
# 需要导入模块: from toontown.hood import ZoneUtil [as 别名]
# 或者: from toontown.hood.ZoneUtil import isDynamicZone [as 别名]
def teleportToShop(self, npcId):
if base.cr.playGame.getPlace().getState() != 'walk':
return
npcZone = NPCToons.getNPCZone(npcId)
npcHood = ZoneUtil.getCanonicalHoodId(npcZone)
hqZone = {2000:2520, 1000:1507, 3000:3508, 4000:4504, 5000:5502, 7000:7503, 9000:9505}
if npcZone in (-1, 0, None):
zoneId = base.localAvatar.getZoneId()
if ZoneUtil.isDynamicZone(zoneId) or ZoneUtil.isCogHQZone(zoneId):
zoneId = 2000
npcHood = ZoneUtil.getCanonicalHoodId(zoneId)
npcZone = hqZone.get(npcHood, 2520)
cost = ToontownGlobals.getTeleportButtonCost(npcHood)
self.destroyDialog()
base.cr.playGame.getPlace().setState('stopped')
if base.localAvatar.getTotalMoney() < cost:
self.dialog = TTDialog.TTDialog(style=TTDialog.Acknowledge, text=TTLocalizer.TeleportButtonNoMoney % cost, command=self.destroyDialog)
else:
self.dialog = TTDialog.TTDialog(style=TTDialog.YesNo, text=TTLocalizer.TeleportButtonConfirm % cost, command=lambda value: self.teleportToShopConfirm(npcZone, npcHood, cost, value))
self.dialog.show()
示例3: enteringAGolfCourse
# 需要导入模块: from toontown.hood import ZoneUtil [as 别名]
# 或者: from toontown.hood.ZoneUtil import isDynamicZone [as 别名]
def enteringAGolfCourse(self, status):
if not status['where'] == 'golfcourse':
return 0
if ZoneUtil.isDynamicZone(status['zoneId']):
return status['hoodId'] == self.hood.hoodId
else:
return ZoneUtil.getHoodId(status['zoneId']) == self.hood.hoodId
示例4: isInThisHq
# 需要导入模块: from toontown.hood import ZoneUtil [as 别名]
# 或者: from toontown.hood.ZoneUtil import isDynamicZone [as 别名]
def isInThisHq(self, status):
if ZoneUtil.isDynamicZone(status['zoneId']):
return status['hoodId'] == self.hood.hoodId
else:
return ZoneUtil.getHoodId(status['zoneId']) == self.hood.hoodId