本文整理汇总了Python中toontown.hood.ZoneUtil.getSafeZoneId方法的典型用法代码示例。如果您正苦于以下问题:Python ZoneUtil.getSafeZoneId方法的具体用法?Python ZoneUtil.getSafeZoneId怎么用?Python ZoneUtil.getSafeZoneId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类toontown.hood.ZoneUtil
的用法示例。
在下文中一共展示了ZoneUtil.getSafeZoneId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: handleStageWinEvent
# 需要导入模块: from toontown.hood import ZoneUtil [as 别名]
# 或者: from toontown.hood.ZoneUtil import getSafeZoneId [as 别名]
def handleStageWinEvent(self):
StageInterior.notify.debug("handleStageWinEvent")
if base.cr.playGame.getPlace().fsm.getCurrentState().getName() == "died":
return
self.stageDefeated = 1
if 1:
zoneId = ZoneUtil.getHoodId(self.zoneId)
else:
zoneId = ZoneUtil.getSafeZoneId(base.localAvatar.defaultZone)
self.fsm.request(
"teleportOut",
[
{
"loader": ZoneUtil.getLoaderName(zoneId),
"where": ZoneUtil.getToonWhereName(zoneId),
"how": "teleportIn",
"hoodId": zoneId,
"zoneId": zoneId,
"shardId": None,
"avId": -1,
}
],
)
示例2: localToonDied
# 需要导入模块: from toontown.hood import ZoneUtil [as 别名]
# 或者: from toontown.hood.ZoneUtil import getSafeZoneId [as 别名]
def localToonDied(self):
target_sz = ZoneUtil.getSafeZoneId(localAvatar.defaultZone)
place = self.cr.playGame.getPlace()
place.fsm.request(
'died',
[{'loader': ZoneUtil.getLoaderName(target_sz),
'where': ZoneUtil.getWhereName(target_sz, 1),
'how': 'teleportIn', 'hoodId': target_sz, 'zoneId': target_sz,
'shardId': None, 'avId': -1, 'battle': 1}])
return
示例3: handleMintWinEvent
# 需要导入模块: from toontown.hood import ZoneUtil [as 别名]
# 或者: from toontown.hood.ZoneUtil import getSafeZoneId [as 别名]
def handleMintWinEvent(self):
MintInterior.notify.debug('handleMintWinEvent')
if base.cr.playGame.getPlace().fsm.getCurrentState().getName() == 'died':
return
self.mintDefeated = 1
if 1:
zoneId = ZoneUtil.getHoodId(self.zoneId)
else:
zoneId = ZoneUtil.getSafeZoneId(base.localAvatar.defaultZone)
self.fsm.request('teleportOut', [{'loader': ZoneUtil.getLoaderName(zoneId),
'where': ZoneUtil.getToonWhereName(zoneId),
'how': 'teleportIn',
'hoodId': zoneId,
'zoneId': zoneId,
'shardId': None,
'avId': -1}])