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(); }
public void RefreshSettings(ServerSettings settings) { _settingsService?.CopySettings(settings); }