Beispiel #1
0
 public AggressiveBehaviour(
     IHostileController hostileController,
     IUnitInfoInternal unitInfo,
     IStateControllerExternal stateController,
     IUnitEvents unitEvents
     )
 {
     _hostileController = hostileController;
     _unitInfo          = unitInfo;
     _unitEvents        = unitEvents;
     _stateController   = stateController;
 }
Beispiel #2
0
        public EnemyController(
            IPeacefulBehaviour peacefulBehaviour,
            IAgressiveBehaviour agressiveBehaviour,
            IOccupatedPossitionsMap occupatedPossitionsMap,
            IStateControllerExternal stateController,
            ILifeController lifeController,
            IUnitEvents unitEvents,
            IUnitInfoExternal unitInfoExternal
            ) : base(occupatedPossitionsMap, unitEvents, stateController, lifeController, unitInfoExternal)
        {
            _peacefulBehaviour      = peacefulBehaviour;
            _agressiveBehaviour     = agressiveBehaviour;
            _occupatedPossitionsMap = occupatedPossitionsMap;

            Initialize();
        }
Beispiel #3
0
        public PlayerController(
            IGameEvents gameEvents,
            IEventDispatcher eventDispatcher,
            IUnitSettings unitSettings,
            IOccupatedPossitionsMap occupatedPossitionsMap,
            IStateControllerExternal stateController,
            ILifeController lifeController,
            IUnitEvents unitEvents,
            IUnitInfoExternal unitInfo
            ) : base(occupatedPossitionsMap, unitEvents, stateController, lifeController, unitInfo)
        {
            _gameEvents      = gameEvents;
            _eventDispatcher = eventDispatcher;
            _unitSettings    = unitSettings;

            Initialize();
        }
Beispiel #4
0
        public OneUnitController(
            IOccupatedPossitionsMap occupatedPossitionsMap,
            IUnitEvents unitEvents,
            IStateControllerExternal stateController,
            ILifeController lifeController,
            IUnitInfoExternal unitInfoExternal)
        {
            _occupatedPossitionsMap = occupatedPossitionsMap;
            _unitEvents             = unitEvents;
            _unitInfoExternal       = unitInfoExternal;
            _stateController        = stateController;
            _lifeController         = lifeController;

            _occupatedPossitionsMap.AddUnit(this);
            _unitEvents.HealthEnded     += HealthEndedHandler;
            _unitEvents.DieComplete     += DieCompleteHandler;
            _lifeController.HealthEnded += HealthEndedHandler;
        }
Beispiel #5
0
 public OneUnitControllerMock(IUnitEvents unitEvents)
 {
     _unitEvents = unitEvents;
 }