本文整理汇总了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)
示例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)