public SettingsController(IConfiguration configuration, IStorage storage, IGameManagerService gameManagerService)
 {
     _configuration             = configuration;
     _gameManagerNodeRepository = storage.GetRepository <IGameManagerNodeRepository>();
     _storage            = storage;
     _gameManagerService = gameManagerService;
 }
Example #2
0
 public BoardPresenter(
     IGameManagerService gameManagerService,
     IScreenManager screenManager)
 {
     _gameManagerService = gameManagerService;
     _screenManager      = screenManager;
 }
Example #3
0
 public GamesController(IStorage storage, IGameManagerService gameManagerService, IConfiguration configuration)
 {
     _gameManagerNodeRepository = storage.GetRepository <IGameManagerNodeRepository>();
     _gameManagerFileRepository = storage.GetRepository <IGameManagerFileRepository>();
     _storage            = storage;
     _gameManagerService = gameManagerService;
     _configuration      = configuration;
 }
Example #4
0
        private void Init(IGameManagerService gameManagerService)
        {
            _gameManagerService = gameManagerService;

            _gameManagerService.Splashed   += OnSplashed;
            _gameManagerService.CardUpdate += OnCardUpdate;
            _totalPointsText.text           = $"{_totalPoints}%";
            _pointsToLifeWidth              = _life.sizeDelta.x / TotalPoints;
        }
Example #5
0
        private async Task Broadcast(Guid sessionId, CancellationToken token)
        {
            while (!token.IsCancellationRequested)
            {
                using (var scope = serviceScopeFactory.CreateScope())
                {
                    IGameManagerService gameManagerService = scope.ServiceProvider.GetService <IGameManagerService>();
                    gameManagerHubContext.Clients.Group(sessionId.ToString()).SendAsync("locationsChanged", gameManagerService.GetLocationsInSession(sessionId));
                }

                await Task.Delay(1000 / TICK_RATE);
            }
        }
Example #6
0
        private void Init(IGameManagerService gameManagerService,
                          IScreenManager screenManager,
                          IPlayerModel playerModel)
        {
            _gameManagerService = gameManagerService;
            _screenManager      = screenManager;
            _playerModel        = playerModel;

            _gameManagerService.Splashed   += OnSplashed;
            _gameManagerService.CardUpdate += OnCardUpdate;
            _pointsText.text = _totalPoints.ToString(PointsFormat);

            var showMaxRecord = _playerModel.HumanRecord > 0;

            _cupImage.SetActive(showMaxRecord);
            _maxRecordText.gameObject.SetActive(showMaxRecord);
            _maxRecordText.text = _playerModel.HumanRecord.ToString(PointsFormat);
        }
Example #7
0
 public GameHub(IGameManagerService gameManager)
 {
     GameManager = gameManager;
 }
Example #8
0
 private void Init(IGameManagerService gameManagerService)
 {
     _gameManagerService = gameManagerService;
 }
Example #9
0
 public LobbyHub(IGameManagerService gameManager)
 {
     GameManager = gameManager;
 }
Example #10
0
 public GameManagerHub(IGameManagerService gameManagerService, ILocationChangedBroadcasterService locationChangedBroadcasterService)
 {
     this.gameManagerService = gameManagerService;
     this.locationChangedBroadcasterService = locationChangedBroadcasterService;
 }
Example #11
0
 public GameSessionController(IGameManagerService gameManagerService, IHubContext <GameManagerHub> gameManagerHubContext)
 {
     this.gameManagerService    = gameManagerService;
     this.gameManagerHubContext = gameManagerHubContext;
 }
Example #12
0
 public BingoGameController(IGameManagerService <int> gameManager)
 {
     this.gameManager = gameManager;
 }