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


Python Toon.teleportDebug函数代码示例

本文整理汇总了Python中toontown.toon.Toon.teleportDebug函数的典型用法代码示例。如果您正苦于以下问题:Python teleportDebug函数的具体用法?Python teleportDebug怎么用?Python teleportDebug使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: enter

    def enter(self, requestStatus, visibilityFlag = 1, arrowsOn = 1):
        teleportDebug(requestStatus, 'Street.enter(%s)' % (requestStatus,))
        self._ttfToken = None
        self.fsm.enterInitialState()
        base.playMusic(self.loader.music, looping=1, volume=0.8)
        self.loader.geom.reparentTo(render)
        if visibilityFlag:
            self.visibilityOn()
        base.localAvatar.setGeom(self.loader.geom)
        base.localAvatar.setOnLevelGround(1)
        self._telemLimiter = TLGatherAllAvs('Street', RotationLimitToH)
        NametagGlobals.setMasterArrowsOn(arrowsOn)
        self.zone = ZoneUtil.getBranchZone(requestStatus['zoneId'])

        def __lightDecorationOn__():
            geom = base.cr.playGame.getPlace().loader.geom
            self.halloweenLights = geom.findAllMatches('**/*light*')
            self.halloweenLights += geom.findAllMatches('**/*lamp*')
            self.halloweenLights += geom.findAllMatches('**/prop_snow_tree*')
            for light in self.halloweenLights:
                light.setColorScaleOff(1)

        if base.cr.newsManager.isHolidayRunning(ToontownGlobals.HALLOWEEN) and self.loader.hood.spookySkyFile:
            lightsOff = Sequence(LerpColorScaleInterval(base.cr.playGame.hood.loader.geom, 0.1, Vec4(0.55, 0.55, 0.65, 1)), Func(self.loader.hood.startSpookySky))
            lightsOff.start()
        else:
            self.loader.hood.startSky()
            lightsOn = LerpColorScaleInterval(base.cr.playGame.hood.loader.geom, 0.1, Vec4(1, 1, 1, 1))
            lightsOn.start()
        self.accept('doorDoneEvent', self.handleDoorDoneEvent)
        self.accept('DistributedDoor_doorTrigger', self.handleDoorTrigger)
        self.enterZone(requestStatus['zoneId'])
        self.tunnelOriginList = base.cr.hoodMgr.addLinkTunnelHooks(self, self.loader.nodeList)
        self.fsm.request(requestStatus['how'], [requestStatus])
开发者ID:BmanGames,项目名称:ToontownStride,代码行数:34,代码来源:Street.py

示例2: enterTownLoader

 def enterTownLoader(self, requestStatus):
     teleportDebug(
         requestStatus, 'ToonHood.enterTownLoader, status=%s' %
         (requestStatus,))
     self.accept(self.loaderDoneEvent, self.handleTownLoaderDone)
     self.loader.enter(requestStatus)
     self.spawnTitleText(requestStatus['zoneId'])
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leak,代码行数:7,代码来源:ToonHood.py

示例3: enterDFACallback

 def enterDFACallback(self, requestStatus, doneStatus):
     teleportDebug(
         requestStatus, 'enterDFACallback%s' %
         ((requestStatus, doneStatus),))
     self.dfa.exit()
     del self.dfa
     if doneStatus['mode'] == 'complete':
         if requestStatus.get('tutorial', 0):
             out = {'teleportIn': 'tunnelOut'}
             requestStatus['zoneId'] = 22000
             requestStatus['hoodId'] = 22000
         else:
             out = {'teleportIn': 'teleportOut',
                    'tunnelIn': 'tunnelOut',
                    'doorIn': 'doorOut'}
         teleportDebug(
             requestStatus,
             'requesting %s, requestStatus=%s' %
             (out[
                 requestStatus['how']],
                 requestStatus))
         self.fsm.request(out[requestStatus['how']], [requestStatus])
     elif doneStatus['mode'] == 'incomplete':
         self.fsm.request('DFAReject')
     else:
         Place.notify.error(
             'Unknown done status for DownloadForceAcknowledge: ' +
             repr(doneStatus))
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leak,代码行数:28,代码来源:Place.py

示例4: enterStreet

 def enterStreet(self, requestStatus):
     teleportDebug(requestStatus, 'enterStreet(%s)' % requestStatus)
     self.acceptOnce(self.placeDoneEvent, self.streetDone)
     self.place = self.streetClass(self, self.fsm, self.placeDoneEvent)
     self.place.load()
     base.cr.playGame.setPlace(self.place)
     self.place.enter(requestStatus)
开发者ID:ToontownModder101,项目名称:Toontown-Offline-Squirting-Flower-Modded-,代码行数:7,代码来源:TownLoader.py

示例5: enterTrialerFA

 def enterTrialerFA(self, requestStatus):
     teleportDebug(requestStatus, 'enterTrialerFA(%s)' % requestStatus)
     self.acceptOnce(
         self.trialerFADoneEvent,
         self.trialerFACallback,
         [requestStatus])
     self.trialerFA = TrialerForceAcknowledge.TrialerForceAcknowledge(
         self.trialerFADoneEvent)
     self.trialerFA.enter(requestStatus['hoodId'])
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leak,代码行数:9,代码来源:Place.py

示例6: enterDFA

 def enterDFA(self, requestStatus):
     teleportDebug(requestStatus, 'enterDFA(%s)' % (requestStatus,))
     self.acceptOnce(
         self.dfaDoneEvent,
         self.enterDFACallback,
         [requestStatus])
     self.dfa = DownloadForceAcknowledge.DownloadForceAcknowledge(
         self.dfaDoneEvent)
     self.dfa.enter(
         base.cr.hoodMgr.getPhaseFromHood(
             requestStatus['hoodId']))
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leak,代码行数:11,代码来源:Place.py

示例7: enterQuietZone

 def enterQuietZone(self, requestStatus):
     teleportDebug(requestStatus, 'Hood.enterQuietZone: status=%s' % requestStatus)
     self._quietZoneDoneEvent = uniqueName('quietZoneDone')
     self.acceptOnce(self._quietZoneDoneEvent, self.handleQuietZoneDone)
     self.quietZoneStateData = QuietZoneState.QuietZoneState(self._quietZoneDoneEvent)
     self._enterWaitForSetZoneResponseMsg = self.quietZoneStateData.getEnterWaitForSetZoneResponseMsg()
     self.acceptOnce(self._enterWaitForSetZoneResponseMsg, self.handleWaitForSetZoneResponse)
     self._quietZoneLeftEvent = self.quietZoneStateData.getQuietZoneLeftEvent()
     if base.placeBeforeObjects:
         self.acceptOnce(self._quietZoneLeftEvent, self.handleLeftQuietZone)
     self.quietZoneStateData.load()
     self.quietZoneStateData.enter(requestStatus)
开发者ID:nate97,项目名称:src,代码行数:12,代码来源:Hood.py

示例8: enter

    def enter(self, requestStatus, visibilityFlag=1, arrowsOn=1):
        teleportDebug(requestStatus, "Street.enter(%s)" % (requestStatus,))
        self._ttfToken = None
        self.fsm.enterInitialState()
        base.playMusic(self.loader.music, looping=1, volume=0.80000000000000004)
        self.loader.geom.reparentTo(render)
        if visibilityFlag:
            self.visibilityOn()

        base.localAvatar.setGeom(self.loader.geom)
        base.localAvatar.setOnLevelGround(1)
        self._telemLimiter = TLGatherAllAvs("Street", RotationLimitToH)
        NametagGlobals.setMasterArrowsOn(arrowsOn)

        def __lightDecorationOn__():
            geom = base.cr.playGame.getPlace().loader.geom
            self.halloweenLights = geom.findAllMatches("**/*light*")
            self.halloweenLights += geom.findAllMatches("**/*lamp*")
            self.halloweenLights += geom.findAllMatches("**/prop_snow_tree*")
            for light in self.halloweenLights:
                light.setColorScaleOff(1)

        newsManager = base.cr.newsManager
        if newsManager:
            holidayIds = base.cr.newsManager.getDecorationHolidayId()
            if (
                ToontownGlobals.HALLOWEEN_COSTUMES in holidayIds or ToontownGlobals.SPOOKY_COSTUMES in holidayIds
            ) and self.loader.hood.spookySkyFile:
                lightsOff = Sequence(
                    LerpColorScaleInterval(
                        base.cr.playGame.hood.loader.geom,
                        0.10000000000000001,
                        Vec4(0.55000000000000004, 0.55000000000000004, 0.65000000000000002, 1),
                    ),
                    Func(self.loader.hood.startSpookySky),
                )
                lightsOff.start()
            else:
                self.loader.hood.startSky()
                lightsOn = LerpColorScaleInterval(
                    base.cr.playGame.hood.loader.geom, 0.10000000000000001, Vec4(1, 1, 1, 1)
                )
                lightsOn.start()
        else:
            self.loader.hood.startSky()
            lightsOn = LerpColorScaleInterval(base.cr.playGame.hood.loader.geom, 0.10000000000000001, Vec4(1, 1, 1, 1))
            lightsOn.start()
        self.accept("doorDoneEvent", self.handleDoorDoneEvent)
        self.accept("DistributedDoor_doorTrigger", self.handleDoorTrigger)
        self.enterZone(requestStatus["zoneId"])
        self.tunnelOriginList = base.cr.hoodMgr.addLinkTunnelHooks(self, self.loader.nodeList, self.zoneId)
        self.fsm.request(requestStatus["how"], [requestStatus])
        self.replaceStreetSignTextures()
开发者ID:OldToontown,项目名称:OldToontown,代码行数:53,代码来源:Street.py

示例9: enterDFACallback

 def enterDFACallback(self, requestStatus, doneStatus):
     teleportDebug(requestStatus, "enterDFACallback%s" % ((requestStatus, doneStatus),))
     self.dfa.exit()
     del self.dfa
     if doneStatus["mode"] == "complete":
         if requestStatus.get("tutorial", 0):
             out = {"teleportIn": "tunnelOut"}
             requestStatus["zoneId"] = 22000
             requestStatus["hoodId"] = 22000
         else:
             out = {"teleportIn": "teleportOut", "tunnelIn": "tunnelOut", "doorIn": "doorOut"}
         teleportDebug(requestStatus, "requesting %s, requestStatus=%s" % (out[requestStatus["how"]], requestStatus))
         self.fsm.request(out[requestStatus["how"]], [requestStatus])
     elif doneStatus["mode"] == "incomplete":
         self.fsm.request("DFAReject")
     else:
         Place.notify.error("Unknown done status for DownloadForceAcknowledge: " + ` doneStatus `)
开发者ID:lolman8776,项目名称:ToontownInfinite,代码行数:17,代码来源:Place.py

示例10: _teleportToFriend

 def _teleportToFriend(self, requestStatus):
     avId = requestStatus['avId']
     hoodId = requestStatus['hoodId']
     zoneId = requestStatus['zoneId']
     if avId != -1:
         if not base.cr.doId2do.has_key(avId):
             teleportDebug(requestStatus, "couldn't find friend %s" % avId)
             handle = base.cr.identifyFriend(avId)
             requestStatus = {'how': 'teleportIn',
              'hoodId': hoodId,
              'zoneId': hoodId,
              'shardId': None,
              'loader': 'safeZoneLoader',
              'where': 'playground',
              'avId': avId}
             self.fsm.request('final')
             self.__teleportOutDone(requestStatus)
     return
开发者ID:Keithybub,项目名称:ToonTownReviveOld,代码行数:18,代码来源:Street.py

示例11: _teleportToFriend

 def _teleportToFriend(self, requestStatus):
     avId = requestStatus["avId"]
     hoodId = requestStatus["hoodId"]
     zoneId = requestStatus["zoneId"]
     if avId != -1:
         if not base.cr.doId2do.has_key(avId):
             teleportDebug(requestStatus, "couldn't find friend %s" % avId)
             handle = base.cr.identifyFriend(avId)
             requestStatus = {
                 "how": "teleportIn",
                 "hoodId": hoodId,
                 "zoneId": hoodId,
                 "shardId": None,
                 "loader": "safeZoneLoader",
                 "where": "playground",
                 "avId": avId,
             }
             self.fsm.request("final")
             self._Street__teleportOutDone(requestStatus)
开发者ID:OldToontown,项目名称:OldToontown,代码行数:19,代码来源:Street.py

示例12: _placeTeleportInPostZoneComplete

    def _placeTeleportInPostZoneComplete(self, requestStatus):
        teleportDebug(requestStatus, '_placeTeleportInPostZoneComplete(%s)' % (requestStatus,))
        NametagGlobals.setWant2dNametags(False)
        base.localAvatar.laffMeter.start()
        base.localAvatar.startQuestMap()
        base.localAvatar.reconsiderCheesyEffect()
        base.localAvatar.obscureMoveFurnitureButton(1)
        avId = requestStatus.get('avId', -1)
        if avId != -1:

            def doTeleport(avId, teleported):
                if avId in base.cr.doId2do:
                    teleportDebug(requestStatus, 'teleport to avatar')
                    avatar = base.cr.doId2do[avId]
                    avatar.forceToTruePosition()
                    base.localAvatar.gotoNode(avatar)
                    base.localAvatar.b_teleportGreeting(avId)
                else:
                    friend = base.cr.identifyAvatar(avId)
                    if friend is not None:
                        # The avatar might be in another zone or not generated yet.
                        if not teleported:
                            # Try again one more time.
                            teleportDebug(requestStatus, 'Retrying teleport...')
                            taskMgr.doMethodLater(0.2, doTeleport, uniqueName('doTeleport'), extraArgs=[avId, True])
                            return

                        teleportDebug(requestStatus, 'friend not here, giving up')
                        base.localAvatar.setSystemMessage(avId, OTPLocalizer.WhisperTargetLeftVisit % (friend.getName(),))
                        friend.d_teleportGiveup(base.localAvatar.doId)

            taskMgr.doMethodLater(0.3, doTeleport, uniqueName('doTeleport'), extraArgs=[avId, False])

        base.transitions.irisIn()
        self.nextState = requestStatus.get('nextState', 'walk')
        base.localAvatar.attachCamera()
        base.localAvatar.startUpdateSmartCamera()
        base.localAvatar.startPosHprBroadcast()
        globalClock.tick()
        base.localAvatar.b_setAnimState('TeleportIn', 1, callback=self.teleportInDone)
        base.localAvatar.d_broadcastPositionNow()
        base.localAvatar.b_setParent(ToontownGlobals.SPRender)
        return
开发者ID:NostalgicTTR,项目名称:Toontown-Infinite-2016-Leak,代码行数:43,代码来源:Place.py

示例13: _placeTeleportInPostZoneComplete

 def _placeTeleportInPostZoneComplete(self, requestStatus):
     teleportDebug(requestStatus, '_placeTeleportInPostZoneComplete(%s)' % (requestStatus,))
     NametagGlobals.setMasterArrowsOn(0)
     base.localAvatar.laffMeter.start()
     base.localAvatar.startQuestMap()
     base.localAvatar.reconsiderCheesyEffect()
     base.localAvatar.obscureMoveFurnitureButton(1)
     avId = requestStatus.get('avId', -1)
     if avId != -1:
         if base.cr.doId2do.has_key(avId):
             teleportDebug(requestStatus, 'teleport to avatar')
             avatar = base.cr.doId2do[avId]
             avatar.forceToTruePosition()
             base.localAvatar.gotoNode(avatar)
             base.localAvatar.b_teleportGreeting(avId)
         else:
             friend = base.cr.identifyAvatar(avId)
             if friend != None:
                 teleportDebug(requestStatus, 'friend not here, giving up')
                 base.localAvatar.setSystemMessage(avId, OTPLocalizer.WhisperTargetLeftVisit % (friend.getName(),))
                 friend.d_teleportGiveup(base.localAvatar.doId)
     base.transitions.irisIn()
     self.nextState = requestStatus.get('nextState', 'walk')
     base.localAvatar.attachCamera()
     base.localAvatar.startUpdateSmartCamera()
     base.localAvatar.startPosHprBroadcast()
     globalClock.tick()
     base.localAvatar.b_setAnimState('TeleportIn', 1, callback=self.teleportInDone)
     base.localAvatar.d_broadcastPositionNow()
     base.localAvatar.b_setParent(ToontownGlobals.SPRender)
     return
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leaked-Source,代码行数:31,代码来源:Place.py

示例14: handleTownLoaderDone

 def handleTownLoaderDone(self):
     doneStatus = self.loader.getDoneStatus()
     teleportDebug(doneStatus, 'handleTownLoaderDone, doneStatus=%s' % (doneStatus,))
     if self.isSameHood(doneStatus):
         teleportDebug(doneStatus, 'same hood')
         self.fsm.request('quietZone', [doneStatus])
     else:
         teleportDebug(doneStatus, 'different hood')
         self.doneStatus = doneStatus
         messenger.send(self.doneEvent)
开发者ID:Teku16,项目名称:Toontown-Crystal-Master,代码行数:10,代码来源:ToonHood.py

示例15: handleSafeZoneLoaderDone

 def handleSafeZoneLoaderDone(self):
     doneStatus = self.loader.getDoneStatus()
     teleportDebug(doneStatus, 'handleSafeZoneLoaderDone, doneStatus=%s' % doneStatus)
     if self.isSameHood(doneStatus) and doneStatus['where'] != 'party' or doneStatus['loader'] == 'minigame':
         teleportDebug(doneStatus, 'same hood')
         self.fsm.request('quietZone', [doneStatus])
     else:
         teleportDebug(doneStatus, 'different hood')
         self.doneStatus = doneStatus
         messenger.send(self.doneEvent)
开发者ID:nate97,项目名称:src,代码行数:10,代码来源:Hood.py


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