コード例 #1
0
        public GodGameOffline(WorldSimulationService worldSimulationService,
                              Model.World world,
                              WorldPersisterService persisterService,
                              UserInputProcessingService userInputProcessingService,
                              UIRenderingService uiRenderingService,
                              DeveloperConsoleService developerConsoleService,
                              ClearGameStateChangesService clearStateChangesSimulator,
                              WorldRenderingSimulator worldRenderingSimulator,
                              WorldRenderingService simpleWorldRenderer
                              )
        {
            World = world;
            this.WorldSimulationService     = worldSimulationService;
            this.clearStateChangesSimulator = clearStateChangesSimulator;



            this.userInputProcessingService = userInputProcessingService;
            this.uiRenderingService         = uiRenderingService;
            this.developerConsoleService    = developerConsoleService;
            this.clearStateChangesSimulator = clearStateChangesSimulator;
            this.worldRenderingSimulator    = worldRenderingSimulator;
            this.simpleWorldRenderer        = simpleWorldRenderer;



            persisterService.Load(world, TWDir.GameData.GetChild("Saves/GodGame").CreateFile("auto.xml"));
        }
コード例 #2
0
        public GodGameServer(WorldSimulationService worldSimulationService,
                             NetworkedPlayerFactory networkedPlayerFactory,
                             ClearGameStateChangesService clearStateChangesSimulator,
                             INetworkConnectorServer networkConnectorServer,
                             GameStateDeltaPacketBuilder deltaPacketBuilder,
                             Model.World world,
                             WorldPersisterService persisterService,
                             UserInputService userInputService)
        {
            World = world;
            this.WorldSimulationService     = worldSimulationService;
            this.clearStateChangesSimulator = clearStateChangesSimulator;
            this.networkConnectorServer     = networkConnectorServer;
            this.deltaPacketBuilder         = deltaPacketBuilder;
            this.userInputService           = userInputService;

            serverPlayerListener = new ServerPlayerListener(networkConnectorServer, networkedPlayerFactory);
            persisterService.Load(world, TWDir.GameData.GetChild("Saves/GodGame").CreateFile("auto.xml"));
        }