Пример #1
0
        protected override void Initialize()
        {
            ServerIOCConfig.Initialize(this);

            // Any data from the GUI thread needed for the logic thread
            // needs to be copied here.
            _settingsService = ServerIOCConfig.Resolve <IServerSettingsService>();
            _settingsService.CopySettings(_initialSettings);

            _moduleService = ServerIOCConfig.Resolve <IModuleService>();
            _moduleService.OpenModule(_moduleName);

            _gameService = ServerGameFactory.GetServerGameService();
            _gameService.Initialize(_graphics);

            _networkService = ServerIOCConfig.Resolve <IServerNetworkService>();
            _networkService.OnPlayerConnected    += PlayerConnected;
            _networkService.OnPlayerDisconnected += PlayerDisconnected;


            base.Initialize();
        }
Пример #2
0
 public void RefreshSettings(ServerSettings settings)
 {
     _settingsService?.CopySettings(settings);
 }