private void InitializeMap(List <OneUnitControllerMock> list) { _occupatedPossitionsMap = new OccupatedPossitionsMap(); foreach (var unitControllerMock in list) { _occupatedPossitionsMap.AddUnit(unitControllerMock); } }
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; }