def startUberDOG(self):
        notify.info("Starting UberDOG")
        # UberDOG repository
        air = AstronInternalRepository(
            UDChannel,  # Repository channel
            serverId=SSChannel,  # Stateserver channel
            dcFileNames=["simple_example.dc"],
            dcSuffix="UD",
            connectMethod=AstronInternalRepository.CM_NET)
        air.connect("127.0.0.1", 7199)
        air.districtId = air.GameGlobalsId = UDChannel

        # Create the LoginManager
        self.login_manager = air.generateGlobalObject(LoginManagerId,
                                                      'LoginManager')
示例#2
0
    def startAIShard(self):
        # DO mappings can only be imported once ShowBase has been instantiated.
        # WTF! FIXME: This has to be fought! No idea how, though...
        from simple_example import DistributedMaprootAI

        # AI repository
        air = AstronInternalRepository(
            AIChannel,  # AI/Shard Channel
            serverId=SSChannel,  # Stateserver Channel
            dcFileNames=["simple_example.dc"],
            connectMethod=AstronInternalRepository.CM_NET)
        air.connect("127.0.0.1", 7199)
        air.districtId = air.GameGlobalsId = AIChannel

        # The map root
        maproot = DistributedMaprootAI(air)
        maproot.generateWithRequiredAndId(air.districtId, 0,
                                          1)  # No parent / zone
        # Setting AI channel.
        air.setAI(maproot.doId, AIChannel)
        maproot.set_maproot()