示例#1
0
        public static Unit CreateNew(int unitType, Point2 location)
        {
            float movementPoints = Globals.Instance.UnitTypes[unitType].Moves;
            var   unit           = new Unit(unitType, location, movementPoints);

            CellVisibilitySetter.SetCellVisibility(unit.Location, Globals.Instance.GameWorld);

            return(unit);
        }
示例#2
0
        public void StartTurn()
        {
            List <Unit> units = new List <Unit>(_units.Count);

            foreach (Unit item in _units)
            {
                Unit unit = item.StartNewTurn();
                units.Add(unit);
                CellVisibilitySetter.SetCellVisibility(unit.Location, Globals.Instance.GameWorld);
            }

            _units             = units;
            _selectedUnitIndex = 0;
        }