• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python hood.ZoneUtil类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: updateMap

 def updateMap(self):
     if self.av:
         hoodId = ZoneUtil.getCanonicalHoodId(self.av.getLocation()[1])
         zoneId = ZoneUtil.getCanonicalBranchZone(self.av.getLocation()[1])
         try:
             mapsGeom = loader.loadModel('phase_4/models/questmap/%s_maps' % ToontownGlobals.dnaMap[hoodId])
         except:
             self.stop()
             return
         mapImage = mapsGeom.find('**/%s_%s_english' % (ToontownGlobals.dnaMap[hoodId], zoneId))
         if not mapImage.isEmpty():
             self.container['image'] = mapImage
             self.resetFrameSize()
             self.cornerPosInfo = QuestMapGlobals.CornerPosTable.get('%s_%s_english' % (ToontownGlobals.dnaMap[hoodId], zoneId))
             self.hqPosInfo = QuestMapGlobals.HQPosTable.get('%s_%s_english' % (ToontownGlobals.dnaMap[hoodId], zoneId))
             self.fishingSpotInfo = QuestMapGlobals.FishingSpotPosTable.get('%s_%s_english' % (ToontownGlobals.dnaMap[hoodId], zoneId))
             self.cogInfoPos = QuestMapGlobals.CogInfoPosTable.get('%s_%s_english' % (ToontownGlobals.dnaMap[hoodId], zoneId))
             self.cogInfoFrame.setPos(self.cogInfoPos)
             self.hide()
             self.hoodId = hoodId
             self.zoneId = zoneId
             self.updateQuestInfo()
             self.updateCogInfo()
             taskMgr.add(self.update, 'questMapUpdate')
         else:
             self.stop()
             mapsGeom.removeNode()
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:27,代码来源:QuestMap.py


示例2: enteringARace

 def enteringARace(self, status):
     if not status['where'] == 'racetrack':
         return 0
     if ZoneUtil.isDynamicZone(status['zoneId']):
         return status['hoodId'] == self.hood.hoodId
     else:
         return ZoneUtil.getHoodId(status['zoneId']) == self.hood.hoodId
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:7,代码来源:GSSafeZoneLoader.py


示例3: enter

    def enter(self):
        ShtikerPage.ShtikerPage.enter(self)
        try:
            zone = base.cr.playGame.getPlace().getZoneId()
        except:
            zone = 0

        if base.localAvatar.lastHood >= ToontownGlobals.BossbotHQ:
            self.safeZoneButton['text'] = TTLocalizer.MapPageBackToCogHQ
        else:
            self.safeZoneButton['text'] = TTLocalizer.MapPageBackToPlayground
        if zone and ZoneUtil.isPlayground(zone) or self.book.safeMode:
            self.safeZoneButton.hide()
        else:
            self.safeZoneButton.show()
        if base.cr.playGame.getPlaceId() == ToontownGlobals.MyEstate and base.cr.playGame.hood.loader.atMyEstate() or self.book.safeMode:
            self.goHomeButton.hide()
        elif base.housingEnabled:
            self.goHomeButton.show()
        if base.cr.playGame.getPlaceId() == ToontownGlobals.MyEstate:
            if base.cr.playGame.hood.loader.atMyEstate():
                self.hoodLabel['text'] = TTLocalizer.MapPageYouAreAtHome
                self.hoodLabel.show()
            else:
                avatar = base.cr.identifyAvatar(base.cr.playGame.hood.loader.estateOwnerId)
                if avatar:
                    avName = avatar.getName()
                    self.hoodLabel['text'] = TTLocalizer.MapPageYouAreAtSomeonesHome % TTLocalizer.GetPossesive(avName)
                    self.hoodLabel.show()
        elif zone:
            hoodName = ToontownGlobals.hoodNameMap.get(ZoneUtil.getCanonicalHoodId(zone), ('',))[-1]
            streetName = ToontownGlobals.StreetNames.get(ZoneUtil.getCanonicalBranchZone(zone), ('',))[-1]
            if hoodName:
                self.hoodLabel['text'] = TTLocalizer.MapPageYouAreHere % (hoodName, streetName)
                self.hoodLabel.show()
            else:
                self.hoodLabel.hide()
        else:
            self.hoodLabel.hide()
        hoodsVisited = base.localAvatar.hoodsVisited
        hoodTeleportList = base.localAvatar.getTeleportAccess()
        for hood in self.allZones:
            label = self.labels[self.allZones.index(hood)]
            clouds = self.clouds[self.allZones.index(hood)]
            if not self.book.safeMode and hood in hoodsVisited:
                label['text_fg'] = (0, 0, 0, 1)
                label.show()
                for cloud in clouds:
                    cloud.hide()

                fullname = base.cr.hoodMgr.getFullnameFromId(hood)
                if hood in hoodTeleportList:
                    text = TTLocalizer.MapPageGoTo % fullname
                    label['text'] = ('', text, text)
                else:
                    label['text'] = ('', fullname, fullname)
            else:
                label.hide()
                for cloud in clouds:
                    cloud.show()
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:60,代码来源:MapPage.py


示例4: enteringAGolfCourse

 def enteringAGolfCourse(self, status):
     if not status["where"] == "golfcourse":
         return 0
     if ZoneUtil.isDynamicZone(status["zoneId"]):
         return status["hoodId"] == self.hood.hoodId
     else:
         return ZoneUtil.getHoodId(status["zoneId"]) == self.hood.hoodId
开发者ID:Wesley1000070,项目名称:Toontown-Crystal,代码行数:7,代码来源:OZSafeZoneLoader.py


示例5: kickToPlayground

 def kickToPlayground(self, retCode):
     if retCode == 0:
         msg = TTLocalizer.EstateOwnerLeftMessage % HouseGlobals.BOOT_GRACE_PERIOD
         self.__popupKickoutMessage(msg)
     elif retCode == 1:
         zoneId = base.localAvatar.lastHood
         self.doneStatus = {'loader': ZoneUtil.getBranchLoaderName(zoneId),
          'where': ZoneUtil.getToonWhereName(zoneId),
          'how': 'teleportIn',
          'hoodId': zoneId,
          'zoneId': zoneId,
          'shardId': None,
          'avId': -1}
         messenger.send(self.doneEvent)
     elif retCode == 2:
         zoneId = base.localAvatar.lastHood
         self.doneStatus = {'loader': ZoneUtil.getBranchLoaderName(zoneId),
          'where': ZoneUtil.getToonWhereName(zoneId),
          'how': 'teleportIn',
          'hoodId': zoneId,
          'zoneId': zoneId,
          'shardId': None,
          'avId': -1}
         messenger.send(self.doneEvent)
     else:
         self.notify.error('unknown reason for exiting estate')
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:26,代码来源:EstateHood.py


示例6: genDNAFileName

 def genDNAFileName(self):
     zoneId = ZoneUtil.getCanonicalZoneId(self.getZoneId())
     hoodId = ZoneUtil.getCanonicalHoodId(zoneId)
     hood = ToontownGlobals.dnaMap[hoodId]
     phase = ToontownGlobals.streetPhaseMap[hoodId]
     if hoodId == zoneId:
         zoneId = 'sz'
     return 'phase_%s/dna/%s_%s.pdna' % (phase, hood, zoneId)
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:8,代码来源:SuitPlannerBase.py


示例7: forcedExit

 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,代码行数:10,代码来源:DistributedElevatorInt.py


示例8: lookupDNAFileName

 def lookupDNAFileName(self, zoneId):
     zoneId = ZoneUtil.getCanonicalZoneId(zoneId)
     hoodId = ZoneUtil.getCanonicalHoodId(zoneId)
     hood = ToontownGlobals.dnaMap[hoodId]
     if hoodId == zoneId:
         zoneId = 'sz'
         phaseNum = ToontownGlobals.phaseMap[hoodId]
     else:
         phaseNum = ToontownGlobals.streetPhaseMap[hoodId]
     return 'phase_%s/dna/%s_%s.pdna' % (phaseNum, hood, zoneId)
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:10,代码来源:ToontownAIRepository.py


示例9: handleWaitForSetZoneResponse

 def handleWaitForSetZoneResponse(self, requestStatus):
     hoodId = requestStatus['hoodId']
     canonicalHoodId = ZoneUtil.getCanonicalZoneId(hoodId)
     toHoodPhrase = ToontownGlobals.hoodNameMap[canonicalHoodId][0]
     hoodName = ToontownGlobals.hoodNameMap[canonicalHoodId][-1]
     zoneId = requestStatus['zoneId']
     requestStatus['loader'] = 'cogHQLoader' if ZoneUtil.isCogHQZone(hoodId) else requestStatus['loader']
     loaderName = requestStatus['loader']
     avId = requestStatus.get('avId', -1)
     ownerId = requestStatus.get('ownerId', avId)
     if base.config.GetBool('want-qa-regression', 0):
         self.notify.info('QA-REGRESSION: NEIGHBORHOODS: Visit %s' % hoodName)
     count = ToontownGlobals.hoodCountMap[canonicalHoodId]
     if loaderName == 'safeZoneLoader':
         count += ToontownGlobals.safeZoneCountMap[canonicalHoodId]
     elif loaderName == 'townLoader':
         count += ToontownGlobals.townCountMap[canonicalHoodId]
     if not loader.inBulkBlock:
         if hoodId == ToontownGlobals.MyEstate:
             if avId == -1:
                 loader.beginBulkLoad('hood', TTLocalizer.HeadingToYourEstate, count, 1, TTLocalizer.TIP_ESTATE, zoneId)
             else:
                 owner = base.cr.identifyAvatar(ownerId)
                 if owner == None:
                     friend = base.cr.identifyAvatar(avId)
                     if friend != None:
                         avName = friend.getName()
                         loader.beginBulkLoad('hood', TTLocalizer.HeadingToFriend % avName, count, 1, TTLocalizer.TIP_ESTATE, zoneId)
                     else:
                         self.notify.warning("we can't perform this teleport")
                         return
                 else:
                     avName = owner.getName()
                     loader.beginBulkLoad('hood', TTLocalizer.HeadingToEstate % avName, count, 1, TTLocalizer.TIP_ESTATE, zoneId)
         elif ZoneUtil.isCogHQZone(zoneId):
             loader.beginBulkLoad('hood', TTLocalizer.HeadingToHood % {'to': toHoodPhrase,
              'hood': hoodName}, count, 1, TTLocalizer.TIP_COGHQ, zoneId)
         elif ZoneUtil.isGoofySpeedwayZone(zoneId):
             loader.beginBulkLoad('hood', TTLocalizer.HeadingToHood % {'to': toHoodPhrase,
              'hood': hoodName}, count, 1, TTLocalizer.TIP_KARTING, zoneId)
         else:
             loader.beginBulkLoad('hood', TTLocalizer.HeadingToHood % {'to': toHoodPhrase,
              'hood': hoodName}, count, 1, TTLocalizer.TIP_GENERAL, zoneId)
     if hoodId == ToontownGlobals.Tutorial:
         self.loadDnaStoreTutorial()
     else:
         if not hasattr(self, 'dnaStore'):
             self.loadDnaStore()
     hoodClass = self.getHoodClassByNumber(canonicalHoodId)
     self.hood = hoodClass(self.fsm, self.hoodDoneEvent, self.dnaStore, hoodId)
     self.hood.load()
     self.hood.loadLoader(requestStatus)
     if not base.placeBeforeObjects:
         loader.endBulkLoad('hood')
     return
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:55,代码来源:PlayGame.py


示例10: load

 def load(self, zoneId):
     self.zoneId = zoneId
     self.parentFSMState.addChild(self.fsm)
     self.loadBattleAnims()
     self.branchZone = ZoneUtil.getBranchZone(zoneId)
     self.canonicalBranchZone = ZoneUtil.getCanonicalBranchZone(zoneId)
     self.music = base.loadMusic(self.musicFile)
     self.activityMusic = base.loadMusic(self.activityMusicFile)
     self.battleMusic = base.loadMusic('phase_3.5/audio/bgm/encntr_general_bg.ogg')
     self.townBattle = TownBattle.TownBattle(self.townBattleDoneEvent)
     self.townBattle.load()
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:11,代码来源:TownLoader.py


示例11: kickToonsOut

 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,代码行数:11,代码来源:DistributedElevatorFloor.py


示例12: enterReward

 def enterReward(self, ts = 0):
     base.localAvatar.b_setParent(ToontownGlobals.SPHidden)
     request = {'loader': ZoneUtil.getBranchLoaderName(self.extZoneId),
      'where': ZoneUtil.getToonWhereName(self.extZoneId),
      'how': 'elevatorIn',
      'hoodId': ZoneUtil.getHoodId(self.extZoneId),
      'zoneId': self.extZoneId,
      'shardId': None,
      'avId': base.localAvatar.doId,
      'bldgDoId': self.distBldgDoId}
     messenger.send('DSIDoneEvent', [request])
     return
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:12,代码来源:DistributedSuitInterior.py


示例13: getRequestStatus

 def getRequestStatus(self):
     zoneId = self.otherZoneId
     request = {'loader': ZoneUtil.getBranchLoaderName(zoneId),
      'where': ZoneUtil.getToonWhereName(zoneId),
      'how': 'doorIn',
      'hoodId': ZoneUtil.getHoodId(zoneId),
      'zoneId': zoneId,
      'shardId': None,
      'avId': -1,
      'allowRedirect': 0,
      'doorDoId': self.otherDoId}
     return request
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:12,代码来源:DistributedCogHQDoor.py


示例14: localToonDied

 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,代码行数:12,代码来源:DistributedBossCog.py


示例15: exitCogdoBuilding

 def exitCogdoBuilding(self):
     if base.localAvatar.hp < 0:
         return
     base.localAvatar.b_setParent(ToontownGlobals.SPHidden)
     request = {'loader': ZoneUtil.getBranchLoaderName(self.extZoneId),
      'where': ZoneUtil.getToonWhereName(self.extZoneId),
      'how': 'elevatorIn',
      'hoodId': ZoneUtil.getHoodId(self.extZoneId),
      'zoneId': self.extZoneId,
      'shardId': None,
      'avId': -1,
      'bldgDoId': self.distBldgDoId}
     messenger.send('DSIDoneEvent', [request])
     return
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:14,代码来源:DistributedCogdoInterior.py


示例16: doPostAnnounceGenerate

    def doPostAnnounceGenerate(self):
        flatDoorTypes = [DoorTypes.INT_STANDARD, DoorTypes.INT_HQ]
        if self.doorType in flatDoorTypes:
            self.bHasFlat = True
        else:
            self.bHasFlat = not self.findDoorNode('door*flat', True).isEmpty()
        self.hideDoorParts()
        self.setTriggerName()

        # Check if we are dealing with a DDL HQ door...
        if self.doorType == DoorTypes.EXT_HQ and \
           ZoneUtil.getHoodId(self.zoneId) == ToontownGlobals.DonaldsDreamland:

            # Get the doorTrigger...
            building = self.getBuilding()
            doorTrigger = building.find('**/%s' % self.getTriggerName())

            # Check if the doorTrigger hasn't been 'fixed' already...
            if not doorTrigger.getTag('fixed'):

                # Reposition the doorTrigger based on its index...
                if self.doorIndex == 0:
                    doorTrigger.setY(doorTrigger, 0.25)
                else:
                    doorTrigger.setY(doorTrigger, -0.25)

                # We are done :) Tag the door as fixed.
                doorTrigger.setTag('fixed', 'true')

        self.accept(self.getEnterTriggerEvent(), self.doorTrigger)
        self.acceptOnce('clearOutToonInterior', self.doorTrigger)
        self.setupNametag()
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:32,代码来源:DistributedDoor.py


示例17: enter

    def enter(self, requestStatus):
        CogHQExterior.CogHQExterior.enter(self, requestStatus)

        for train in self.trains:
            train.show()

        # Load the CogHQ DNA file:
        dnaStore = DNAStorage()
        dnaFileName = self.genDNAFileName(self.zoneId)
        loadDNAFileAI(dnaStore, dnaFileName)

        # Collect all of the vis group zone IDs:
        self.zoneVisDict = {}
        for i in xrange(dnaStore.getNumDNAVisGroupsAI()):
            groupFullName = dnaStore.getDNAVisGroupName(i)
            visGroup = dnaStore.getDNAVisGroupAI(i)
            visZoneId = int(base.cr.hoodMgr.extractGroupName(groupFullName))
            visibles = []
            for i in xrange(visGroup.getNumVisibles()):
                visibles.append(int(visGroup.getVisible(i)))
            visibles.append(ZoneUtil.getBranchZone(visZoneId))
            self.zoneVisDict[visZoneId] = visibles

        # Next, we want interest in all vis groups due to this being a Cog HQ:
        base.cr.sendSetZoneMsg(self.zoneId, self.zoneVisDict.values()[0])
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:25,代码来源:CashbotHQExterior.py


示例18: createStartingBlocks

 def createStartingBlocks(self):
     self.racingPads = []
     self.viewingPads = []
     racingPadGroups = []
     viewingPadGroups = []
     for zoneId in self.getZoneTable():
         dnaData = self.air.dnaDataMap.get(zoneId, None)
         if dnaData.getName() == 'root':
             area = ZoneUtil.getCanonicalZoneId(zoneId)
             (foundRacingPads, foundRacingPadGroups) = self.findRacingPads(dnaData, zoneId, area, padType='racing_pad')
             (foundViewingPads, foundViewingPadGroups) = self.findRacingPads(dnaData, zoneId, area, padType='viewing_pad')
             self.racingPads.extend(foundRacingPads)
             racingPadGroups.extend(foundRacingPadGroups)
             self.viewingPads.extend(foundViewingPads)
             viewingPadGroups.extend(foundViewingPadGroups)
     self.startingBlocks = []
     for (dnaGroup, racePad) in zip(racingPadGroups, self.racingPads):
         foundStartingBlocks = self.findStartingBlocks(dnaGroup, racePad)
         self.startingBlocks.extend(foundStartingBlocks)
         for startingBlock in foundStartingBlocks:
             racePad.addStartingBlock(startingBlock)
     self.viewingBlocks = []
     for (dnaGroup, viewPad) in zip(viewingPadGroups, self.viewingPads):
         foundViewingBlocks = self.findStartingBlocks(dnaGroup, viewPad)
         self.viewingBlocks.extend(foundViewingBlocks)
         for viewingBlock in foundViewingBlocks:
             viewPad.addStartingBlock(viewingBlock)
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:27,代码来源:GSHoodAI.py


示例19: 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:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:34,代码来源:Street.py


示例20: __init__

 def __init__(self, doneEvent, petSeed, petNameIndex):
     zoneId = ZoneUtil.getCanonicalSafeZoneId(base.localAvatar.getZoneId())
     name, dna, traitSeed = PetUtil.getPetInfoFromSeed(petSeed, zoneId)
     name = TTLocalizer.getPetName(petNameIndex)
     cost = PetUtil.getPetCostFromSeed(petSeed, zoneId)
     model = loader.loadModel('phase_4/models/gui/AdoptPet')
     modelPos = (0, 0, -0.3)
     modelScale = 0.055
     DirectFrame.__init__(self, relief=None, state='normal', geom=model, geom_color=ToontownGlobals.GlobalDialogColor, geom_scale=modelScale, frameSize=(-1, 1, -1, 1), pos=modelPos, text=TTLocalizer.PetshopAdoptConfirm % (name, cost), text_wordwrap=12, text_scale=0.05, text_pos=(0, 0.55), text_fg=text0Color)
     self.initialiseoptions(PetshopGUI.AdoptPetDlg)
     self.petView = self.attachNewNode('petView')
     self.petView.setPos(-0.13, 0, 0.8)
     self.petModel = Pet.Pet(forGui=1)
     self.petModel.setDNA(dna)
     self.petModel.fitAndCenterHead(0.395, forGui=1)
     self.petModel.reparentTo(self.petView)
     self.petModel.setH(130)
     self.petModel.setScale(0.125)
     self.petModel.enterNeutralHappy()
     self.moneyDisplay = DirectLabel(parent=self, relief=None, text=str(base.localAvatar.getTotalMoney()), text_scale=0.075, text_fg=(0.95, 0.95, 0, 1), text_shadow=(0, 0, 0, 1), text_pos=(0.225, 0.33), text_font=ToontownGlobals.getSignFont())
     self.accept(localAvatar.uniqueName('moneyChange'), self.__moneyChange)
     self.accept(localAvatar.uniqueName('bankMoneyChange'), self.__moneyChange)
     okImageList = (model.find('**/CheckButtonUp'), model.find('**/CheckButtonDown'), model.find('**/CheckButtonRollover'))
     cancelImageList = (model.find('**/CancelButtonUp'), model.find('**/CancelButtonDown'), model.find('**/CancelRollover'))
     cancelIcon = model.find('**/CancelIcon')
     checkIcon = model.find('**/CheckIcon')
     self.cancelButton = DirectButton(parent=self, relief=None, image=cancelImageList, geom=cancelIcon, scale=modelScale, text=('', TTLocalizer.PetshopGoBack), text_pos=(-5.8, 4.4), text_scale=0.7, pressEffect=False, command=lambda : messenger.send(doneEvent, [0]))
     self.okButton = DirectButton(parent=self, relief=None, image=okImageList, geom=checkIcon, scale=modelScale, text=('', TTLocalizer.PetshopAdopt), text_pos=(5.8, 4.4), text_scale=0.7, pressEffect=False, command=lambda : messenger.send(doneEvent, [1]))
     model.removeNode()
     return
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:30,代码来源:PetshopGUI.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python toonbase.ToontownGlobals类代码示例发布时间:2022-05-27
下一篇:
Python path.Path类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap