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


Python ZoneUtil.getLoaderName方法代码示例

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


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

示例1: forcedExit

# 需要导入模块: from src.toontown.hood import ZoneUtil [as 别名]
# 或者: from src.toontown.hood.ZoneUtil import getLoaderName [as 别名]
 def forcedExit(self, avId):
     target_sz = base.localAvatar.defaultZone
     base.cr.playGame.getPlace().fsm.request('teleportOut', [{'loader': ZoneUtil.getLoaderName(target_sz),
       'where': ZoneUtil.getWhereName(target_sz, 1),
       'how': 'teleportIn',
       'hoodId': target_sz,
       'zoneId': target_sz,
       'shardId': None,
       'avId': -1}], force=1)
     return
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:12,代码来源:DistributedElevatorInt.py

示例2: kickToonsOut

# 需要导入模块: from src.toontown.hood import ZoneUtil [as 别名]
# 或者: from src.toontown.hood.ZoneUtil import getLoaderName [as 别名]
 def kickToonsOut(self):
     if not self.localToonOnBoard:
         zoneId = self.cr.playGame.hood.hoodId
         self.cr.playGame.getPlace().fsm.request('teleportOut', [{'loader': ZoneUtil.getLoaderName(zoneId),
           'where': ZoneUtil.getToonWhereName(zoneId),
           'how': 'teleportIn',
           'hoodId': zoneId,
           'zoneId': zoneId,
           'shardId': None,
           'avId': -1}])
     return
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:13,代码来源:DistributedElevatorFloor.py

示例3: localToonDied

# 需要导入模块: from src.toontown.hood import ZoneUtil [as 别名]
# 或者: from src.toontown.hood.ZoneUtil import getLoaderName [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
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:14,代码来源:DistributedBossCog.py

示例4: handleMintWinEvent

# 需要导入模块: from src.toontown.hood import ZoneUtil [as 别名]
# 或者: from src.toontown.hood.ZoneUtil import getLoaderName [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}])
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:18,代码来源:MintInterior.py

示例5: goToPartyFailed

# 需要导入模块: from src.toontown.hood import ZoneUtil [as 别名]
# 或者: from src.toontown.hood.ZoneUtil import getLoaderName [as 别名]
 def goToPartyFailed(self, reason):
     self.notify.debug('goToPartyFailed')
     failedToVisitAvId = self.doneStatus.get('avId')
     message = base.cr.partyManager.getGoToPartyFailedMessage(reason)
     self.notify.debug('goToPartyFailed, why =: %s' % message)
     self.ignore('gotLocalPartyZone')
     zoneId = base.localAvatar.lastHood
     loaderName = ZoneUtil.getLoaderName(zoneId)
     whereName = ZoneUtil.getToonWhereName(zoneId)
     base.localAvatar.setSystemMessage(0, message)
     self.fsm.request('quietZone', [{'loader': loaderName,
       'where': whereName,
       'how': 'teleportIn',
       'hoodId': zoneId,
       'zoneId': zoneId,
       'shardId': None}])
     return Task.done
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:19,代码来源:PlayGame.py

示例6: kickToonsOut

# 需要导入模块: from src.toontown.hood import ZoneUtil [as 别名]
# 或者: from src.toontown.hood.ZoneUtil import getLoaderName [as 别名]
 def kickToonsOut(self):
     if not self.localToonOnBoard:
         zoneId = self.cr.playGame.hood.hoodId
         self.cr.playGame.getPlace().fsm.request(
             "teleportOut",
             [
                 {
                     "loader": ZoneUtil.getLoaderName(zoneId),
                     "where": ZoneUtil.getToonWhereName(zoneId),
                     "how": "teleportIn",
                     "hoodId": zoneId,
                     "zoneId": zoneId,
                     "shardId": None,
                     "avId": -1,
                 }
             ],
         )
     return
开发者ID:Wesley1000070,项目名称:Toontown-Crystal,代码行数:20,代码来源:DistributedClubElevator.py

示例7: goHomeFailed

# 需要导入模块: from src.toontown.hood import ZoneUtil [as 别名]
# 或者: from src.toontown.hood.ZoneUtil import getLoaderName [as 别名]
 def goHomeFailed(self, task):
     self.notify.debug('goHomeFailed')
     failedToVisitAvId = self.doneStatus.get('avId')
     if failedToVisitAvId > 0:
         message = TTLocalizer.EstateTeleportFailedNotFriends % base.cr.identifyAvatar(failedToVisitAvId).getName()
     else:
         message = TTLocalizer.EstateTeleportFailed
     self.notify.debug('goHomeFailed, why =: %s' % message)
     self.ignore('setLocalEstateZone')
     zoneId = base.localAvatar.lastHood
     loaderName = ZoneUtil.getLoaderName(zoneId)
     whereName = ZoneUtil.getToonWhereName(zoneId)
     base.localAvatar.setSystemMessage(0, message)
     self.fsm.request('quietZone', [{'loader': loaderName,
       'where': whereName,
       'how': 'teleportIn',
       'hoodId': zoneId,
       'zoneId': zoneId,
       'shardId': None}])
     return Task.done
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:22,代码来源:PlayGame.py

示例8: enter

# 需要导入模块: from src.toontown.hood import ZoneUtil [as 别名]
# 或者: from src.toontown.hood.ZoneUtil import getLoaderName [as 别名]
 def enter(self, hoodId, zoneId, avId):
     if hoodId == ToontownGlobals.Tutorial:
         loaderName = 'townLoader'
         whereName = 'toonInterior'
     elif hoodId == ToontownGlobals.MyEstate:
         self.getEstateZoneAndGoHome(avId, zoneId)
         return
     elif hoodId == ToontownGlobals.PartyHood:
         self.getPartyZoneAndGoToParty(avId, zoneId)
         return
     else:
         loaderName = ZoneUtil.getLoaderName(zoneId)
         whereName = ZoneUtil.getToonWhereName(zoneId)
     self.fsm.request('quietZone', [{'loader': loaderName,
       'where': whereName,
       'how': 'teleportIn',
       'hoodId': hoodId,
       'zoneId': zoneId,
       'shardId': None,
       'avId': avId}])
     return
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:23,代码来源:PlayGame.py

示例9: addLinkTunnelHooks

# 需要导入模块: from src.toontown.hood import ZoneUtil [as 别名]
# 或者: from src.toontown.hood.ZoneUtil import getLoaderName [as 别名]
    def addLinkTunnelHooks(self, hoodPart, nodeList):
        tunnelOriginList = []
        for i in nodeList:
            linkTunnelNPC = i.findAllMatches('**/linktunnel*')
            for p in xrange(linkTunnelNPC.getNumPaths()):
                linkTunnel = linkTunnelNPC.getPath(p)
                name = linkTunnel.getName()
                nameParts = name.split('_')
                hoodStr = nameParts[1]
                zoneStr = nameParts[2]
                hoodId = self.getIdFromName(hoodStr)
                zoneId = int(zoneStr)
                linkSphere = linkTunnel.find('**/tunnel_trigger')
                if linkSphere.isEmpty():
                    linkSphere = linkTunnel.find('**/tunnel_sphere')
                if not linkSphere.isEmpty():
                    cnode = linkSphere.node()
                    cnode.setName('tunnel_trigger_' + hoodStr + '_' + zoneStr)
                    cnode.setCollideMask(ToontownGlobals.WallBitmask | ToontownGlobals.GhostBitmask)
                else:
                    linkSphere = linkTunnel.find('**/tunnel_trigger_' + hoodStr + '_' + zoneStr)
                    if linkSphere.isEmpty():
                        self.notify.error('tunnel_trigger not found')
                tunnelOrigin = linkTunnel.find('**/tunnel_origin')
                if tunnelOrigin.isEmpty():
                    self.notify.error('tunnel_origin not found')
                tunnelOriginPlaceHolder = render.attachNewNode('toph_' + hoodStr + '_' + zoneStr)
                tunnelOriginList.append(tunnelOriginPlaceHolder)
                tunnelOriginPlaceHolder.setPos(tunnelOrigin.getPos(render))
                tunnelOriginPlaceHolder.setHpr(tunnelOrigin.getHpr(render))
                hood = base.localAvatar.cr.playGame.hood
                if ZoneUtil.tutorialDict:
                    how = 'teleportIn'
                    tutorialFlag = 1
                else:
                    how = 'tunnelIn'
                    tutorialFlag = 0
                hoodPart.accept('enter' + linkSphere.getName(), hoodPart.handleEnterTunnel, [{'loader': ZoneUtil.getLoaderName(zoneId),
                  'where': ZoneUtil.getToonWhereName(zoneId),
                  'how': how,
                  'hoodId': hoodId,
                  'zoneId': zoneId,
                  'shardId': None,
                  'tunnelOrigin': tunnelOriginPlaceHolder,
                  'tutorial': tutorialFlag}])

        return tunnelOriginList
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:49,代码来源:HoodMgr.py


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