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


Python FactorySpecs类代码示例

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


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

示例1: generate

    def generate(self):
        self.notify.info('generate')
        self.notify.info('start factory %s %s creation, frame=%s' % (self.factoryId, self.doId, globalClock.getFrameCount()))
        if __dev__:
            simbase.factory = self
        self.notify.info('loading spec')
        specModule = FactorySpecs.getFactorySpecModule(self.factoryId)
        factorySpec = LevelSpec.LevelSpec(specModule)
        if __dev__:
            self.notify.info('creating entity type registry')
            typeReg = self.getEntityTypeReg()
            factorySpec.setEntityTypeReg(typeReg)
        self.notify.info('creating entities')
        DistributedLevelAI.DistributedLevelAI.generate(self, factorySpec)
        self.notify.info('creating cogs')
        cogSpecModule = FactorySpecs.getCogSpecModule(self.factoryId)
        self.planner = LevelSuitPlannerAI.LevelSuitPlannerAI(self.air, self, DistributedFactorySuitAI.DistributedFactorySuitAI, DistributedBattleFactoryAI.DistributedBattleFactoryAI, cogSpecModule.CogData, cogSpecModule.ReserveCogData, cogSpecModule.BattleCells)
        suitHandles = self.planner.genSuits()
        messenger.send('plannerCreated-' + str(self.doId))
        self.suits = suitHandles['activeSuits']
        self.reserveSuits = suitHandles['reserveSuits']
        self.d_setSuits()
        scenario = 0
        for avId in self.avIdList:
            self.air.writeServerEvent('factory-entered', avId=avId, factoryId=self.factoryId, entranceId=self.entranceId, scenario=scenario, avIds=self.avIdList)

        self.notify.info('finish factory %s %s creation' % (self.factoryId, self.doId))
开发者ID:AdrianF98,项目名称:Toontown-Rewritten,代码行数:27,代码来源:DistributedFactoryAI.py

示例2: levelAnnounceGenerate

 def levelAnnounceGenerate(self):
     self.notify.debug('levelAnnounceGenerate')
     DistributedLevel.DistributedLevel.levelAnnounceGenerate(self)
     specModule = FactorySpecs.getFactorySpecModule(self.factoryId)
     factorySpec = LevelSpec.LevelSpec(specModule)
     #if __dev__:
     #    typeReg = self.getEntityTypeReg()
     #    factorySpec.setEntityTypeReg(typeReg)
     DistributedLevel.DistributedLevel.initializeLevel(self, factorySpec)
开发者ID:Teku16,项目名称:MikeyTheRepository,代码行数:9,代码来源:DistributedFactory.py

示例3: levelAnnounceGenerate

 def levelAnnounceGenerate(self):
     self.notify.debug("levelAnnounceGenerate")
     DistributedLevel.DistributedLevel.levelAnnounceGenerate(self)
     specModule = FactorySpecs.getFactorySpecModule(self.lawOfficeId)
     factorySpec = LevelSpec.LevelSpec(specModule)
     if __dev__:
         typeReg = self.getEntityTypeReg()
         factorySpec.setEntityTypeReg(typeReg)
     DistributedLevel.DistributedLevel.initializeLevel(self, factorySpec)
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leaked-Source,代码行数:9,代码来源:DistributedLawOfficeFloor.py

示例4: startFloor

 def startFloor(self):
     self.notify.info('loading spec')
     self.factorySpec = LevelSpec.LevelSpec(self.spec)
     self.notify.info('creating entities')
     DistributedLevelAI.DistributedLevelAI.generate(self, self.factorySpec)
     self.notify.info('creating cogs')
     cogSpecModule = FactorySpecs.getCogSpecModule(self.lawOfficeId)
     self.planner = LevelSuitPlannerAI.LevelSuitPlannerAI(self.air, self, DistributedFactorySuitAI.DistributedFactorySuitAI, DistributedBattleFactoryAI.DistributedBattleFactoryAI, cogSpecModule.CogData, cogSpecModule.ReserveCogData, cogSpecModule.BattleCells)
     suitHandles = self.planner.genSuits()
     messenger.send('plannerCreated-' + str(self.doId))
     self.suits = suitHandles['activeSuits']
     self.reserveSuits = suitHandles['reserveSuits']
     self.d_setSuits()
     scenario = 0
     description = '%s|%s|%s|%s' % (self.lawOfficeId, self.entranceId, scenario, self.avIdList)
     for avId in self.avIdList:
         self.air.writeServerEvent('DAOffice Entered', avId, description)
     self.notify.info('finish factory %s %s creation' % (self.lawOfficeId, self.doId))
开发者ID:Teku16,项目名称:Toontown-Crystal-Master,代码行数:18,代码来源:DistributedLawOfficeFloorAI.py

示例5: getBattleCellSpec

 def getBattleCellSpec(self, battleCellId):
     cogSpecModule = FactorySpecs.getCogSpecModule(self.factoryId)
     return cogSpecModule.BattleCells[battleCellId]
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:3,代码来源:DistributedFactory.py

示例6: getReserveCogSpec

 def getReserveCogSpec(self, cogId):
     cogSpecModule = FactorySpecs.getCogSpecModule(self.factoryId)
     return cogSpecModule.ReserveCogData[cogId]
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:3,代码来源:DistributedFactory.py

示例7: getCogSpec

 def getCogSpec(self, cogId):
     cogSpecModule = FactorySpecs.getCogSpecModule(self.lawOfficeId)
     return cogSpecModule.CogData[cogId]
开发者ID:BmanGames,项目名称:ToontownStride,代码行数:3,代码来源:DistributedLawOfficeFloor.py


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