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