Пример #1
0
        public BuffRepositoryFactory(IResourcesRepository resourcesRepository)
        {
            var settings    = resourcesRepository.GameSettings;
            var playerBuffs = resourcesRepository.PlayerBuffs;

            BuffsRepository = new BuffsRepository(playerBuffs, settings);
        }
Пример #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;
 }
Пример #3
0
 public PlayerControllerFactory(IBuffsRepository buffRepository, IResourcesRepository resourcesRepository)
 {
     PlayerController = new PlayerController(buffRepository, resourcesRepository.PlayerStats, resourcesRepository.GameSettings.PlayersCount);
 }