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


Python ZoneUtil.isHQ方法代码示例

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


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

示例1: enterTeleportIn

# 需要导入模块: from toontown.hood import ZoneUtil [as 别名]
# 或者: from toontown.hood.ZoneUtil import isHQ [as 别名]
 def enterTeleportIn(self, requestStatus):
     modelType = DistributedToonInterior.DistributedToonInterior(base.cr).getModelType(self.getZoneId())
     if self.zoneId == ToontownGlobals.ToonHall:
         base.localAvatar.setPosHpr(-63.5, 30.5, ToontownGlobals.FloorOffset, 90.0, 0.0, 0.0)
     elif ZoneUtil.isHQ(self.zoneId):
         base.localAvatar.setPosHpr(-5.5, -1.5, ToontownGlobals.FloorOffset, 0.0, 0.0, 0.0)
     elif ZoneUtil.isPetshop(self.zoneId):
         base.localAvatar.setPosHpr(0, 0, ToontownGlobals.FloorOffset, 45.0, 0.0, 0.0)
     elif modelType in InteriorTypes:
         area = InteriorTypes[modelType]
         base.localAvatar.setPosHpr(area[0], area[1], ToontownGlobals.FloorOffset, area[2], 0.0, 0.0)
     else:
         base.localAvatar.setPosHpr(2.5, 11.5, ToontownGlobals.FloorOffset, 45.0, 0.0, 0.0)
     Place.Place.enterTeleportIn(self, requestStatus)
开发者ID:BmanGames,项目名称:ToontownStride,代码行数:16,代码来源:ToonInterior.py

示例2: teleportToShop

# 需要导入模块: from toontown.hood import ZoneUtil [as 别名]
# 或者: from toontown.hood.ZoneUtil import isHQ [as 别名]
 def teleportToShop(self, npcId):
     npcZone = NPCToons.getNPCZone(npcId)
     npcHood = ZoneUtil.getCanonicalHoodId(npcZone)
     avZone = base.localAvatar.getZoneId()
     avHood = ZoneUtil.getCanonicalHoodId(avZone)
     avShard = base.localAvatar.defaultShard
     avPlace = base.cr.playGame.getPlace()
     hqZone = {2000:2520, 1000:1507, 3000:3508, 4000:4504, 5000:5502, 7000:7503, 9000:9505}
     def callback(flag):
         if flag:
             npcZone = None
     base.cr.buildingQueryMgr.d_isSuit(npcZone, callback)
     if avShard not in base.cr.activeDistrictMap:
         return
     if npcZone in [-1, 0, None]:
         return
     if not ZoneUtil.isInterior(npcZone):
         return
     if ZoneUtil.isHQ(npcZone):
         args = (avHood, hqZone[avHood], avShard, -1)
     else:
         args = (npcHood, npcZone, avShard, -1)
     avPlace.requestTeleport(*args)
开发者ID:Teku16,项目名称:Toontown-Crystal-Master,代码行数:25,代码来源:QuestPoster.py


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