Example #1
0
 public PlayerService(IDistributedCache cache, IHubContext <PlayerHub> playerHub, IMongoConfiguration mongoConfig, IGameConfigService gameConfigService) : base(cache, mongoConfig)
 {
     _playerHub         = playerHub;
     _dicPlayer         = new Dictionary <Guid, Player>();
     _gameConfigService = gameConfigService;
     _collectionPlayer  = MongoGetCollection <Player>();
 }
Example #2
0
 protected override void OnInitReference(IServiceContainer serviceContainer, IManagerContainer mgrContainer)
 {
     _gameEffectService      = serviceContainer.GetService <IGameEffectService>();
     _gameAudioService       = serviceContainer.GetService <IGameAudioService>();
     _gameStateService       = serviceContainer.GetService <IGameStateService>();
     _gameConfigService      = serviceContainer.GetService <IGameConfigService>();
     _gameResourceService    = serviceContainer.GetService <IGameResourceService>();
     _gameConstStateService  = serviceContainer.GetService <IGameConstStateService>();
     _gameCollision2DService = serviceContainer.GetService <IGameCollision2DService>();
     _gameUnitService        = serviceContainer.GetService <IGameUnitService>();
 }
Example #3
0
 public override void InitReference(IServiceContainer serviceContainer, IManagerContainer mgrContainer = null)
 {
     base.InitReference(serviceContainer, mgrContainer);
     _gameEffectService     = serviceContainer.GetService <IGameEffectService>();
     _gameAudioService      = serviceContainer.GetService <IGameAudioService>();
     _gameStateService      = serviceContainer.GetService <IGameStateService>();
     _gameConfigService     = serviceContainer.GetService <IGameConfigService>();
     _gameCollisionService  = serviceContainer.GetService <IGameCollision2DService>();
     _gameConstStateService = serviceContainer.GetService <IGameConstStateService>();
     _gameUnitService       = serviceContainer.GetService <IGameUnitService>();
 }
        public override void InitReference(IServiceContainer serviceContainer, IManagerContainer mgrContainer)
        {
            base.InitReference(serviceContainer, mgrContainer);

            _networkService         = serviceContainer.GetService <INetworkService>();
            SimulatorServiceService = serviceContainer.GetService <ISimulatorService>();
            _uiService = serviceContainer.GetService <IUIService>();

            _gameEffectService   = serviceContainer.GetService <IGameEffectService>();
            _gameAudioService    = serviceContainer.GetService <IGameAudioService>();
            _gameStateService    = serviceContainer.GetService <IGameStateService>();
            _gameConfigService   = serviceContainer.GetService <IGameConfigService>();
            _gameViewService     = serviceContainer.GetService <IGameViewService>();
            _gameResourceService = serviceContainer.GetService <IGameResourceService>();
        }
Example #5
0
 protected override void OnInit(BaseContext context, IServiceContainer services)
 {
     _context = (Context)context;
     //BuildInServices
     _randomService        = services.GetService <IRandomService>();
     _timeMachineService   = services.GetService <ITimeMachineService>();
     _globalStateService   = services.GetService <IGlobalStateService>();
     _viewService          = services.GetService <IViewService>();
     _audioService         = services.GetService <IAudioService>();
     _inputService         = services.GetService <IInputService>();
     _map2DService         = services.GetService <IMap2DService>();
     _resService           = services.GetService <IResService>();
     _effectService        = services.GetService <IEffectService>();
     _eventRegisterService = services.GetService <IEventRegisterService>();
     _idService            = services.GetService <IIdService>();
     _debugService         = services.GetService <IDebugService>();
     //GameServices
     _gameStateService  = services.GetService <IGameStateService>();
     _gameConfigService = services.GetService <IGameConfigService>();
     _gameEventService  = services.GetService <IGameEventService>();
 }
 protected override void OnInitReference(IServiceContainer serviceContainer, IManagerContainer mgrContainer)
 {
     _gameStateService    = serviceContainer.GetService <IGameStateService>();
     _gameConfigService   = serviceContainer.GetService <IGameConfigService>();
     _gameResourceService = serviceContainer.GetService <IGameResourceService>();
 }