Exemple #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();
        }
Exemple #2
0
 protected override void ConfigureContainerBuilder(ContainerBuilder builder)
 {
     base.ConfigureContainerBuilder(builder);
     ServerIOCConfig.Initialize(builder);
 }