public BuffRepositoryFactory(IResourcesRepository resourcesRepository)
        {
            var settings    = resourcesRepository.GameSettings;
            var playerBuffs = resourcesRepository.PlayerBuffs;

            BuffsRepository = new BuffsRepository(playerBuffs, settings);
        }
Exemple #2
0
 public PlayerController(IBuffsRepository buffsRepository, Stat[] defaultStats, int playerCount)
 {
     _playerCount     = playerCount;
     _defaultStats    = defaultStats;
     _buffsRepository = buffsRepository;
     GameController.GameRestartedEvent += OnGameRestartedHandler;
     GameController.GameEndedEvent     += OnGameEnded;
     PlayerUiController.AttackEvent    += OnAttack;
 }
 public PlayerControllerFactory(IBuffsRepository buffRepository, IResourcesRepository resourcesRepository)
 {
     PlayerController = new PlayerController(buffRepository, resourcesRepository.PlayerStats, resourcesRepository.GameSettings.PlayersCount);
 }