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


Python ZoneUtil.isDynamicZone方法代码示例

本文整理汇总了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
开发者ID:BmanGames,项目名称:Toontown-Level-Editor,代码行数:9,代码来源:GSSafeZoneLoader.py

示例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()
开发者ID:BmanGames,项目名称:ToontownStride,代码行数:27,代码来源:QuestPoster.py

示例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
开发者ID:nate97,项目名称:src,代码行数:9,代码来源:OZSafeZoneLoader.py

示例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
开发者ID:gamerdave54321,项目名称:Toontown-House-Code,代码行数:7,代码来源:CogHQLoader.py


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