Пример #1
0
        public ChaosUnitController(EnemyController unit,
                                   UnitsCountNotifier unitsCountNotifier,
                                   IOccupatedPossitionsMap occupatedPossitionsMap,
                                   UnitNameResolver unitNameResolver,
                                   ChaosBattlefield.SquareArea area)
        {
            _unit = unit;
            _occupatedPossitionsMap = occupatedPossitionsMap;
            _unitsCountNotifier     = unitsCountNotifier;
            _unitNameResolver       = unitNameResolver;
            _unitName = _unitNameResolver.ResolveNextName();
            _area     = area;

            Initialize();
        }
Пример #2
0
        public ChaosBattlefield(
            EnemyController.Factory enemyFactory,
            IOccupatedPossitionsMap occupatedPossitionsMap)
        {
            _enemyFactory           = enemyFactory;
            _occupatedPossitionsMap = occupatedPossitionsMap;
            _unitsCountNotifier     = new UnitsCountNotifier();
            _unitNameResolver       = new UnitNameResolver();
            _unitsCountNotifier.UnitsCountDecreased += OnUnitsCountDecreased;

            TOP_LEFT     = new IntVector2(0, 10);
            BOTTOM_RIGHT = new IntVector2(10, 0);

            _random = new Random();
        }