Пример #1
0
        public static void DoOrder(GameUnit unit, List <TilePosition> pathIndexes,
                                   OrderTypes orderType)
        {
            if (pathIndexes.Count == 0)
            {
                return;
            }

            var orderList = PreInitOrder(unit, pathIndexes, orderType);

            GameMoveManager.AddOrder(unit, orderList);
        }
Пример #2
0
        //One order at end for cast ability
        public static void AddCastAbilityOrder(AbstractGameObject unit, TilePosition tilePos, Ability ability)
        {
            if (tilePos == null)
            {
                return;
            }
            var orderType = OrderTypes.CastAbilityOrder;

            var unitOrder = new UnitOrder(
                unit,
                tilePos,
                orderType,
                ability);

            GameMoveManager.AddOrderAtEnd(unit, new List <UnitOrder>()
            {
                unitOrder
            });
        }
Пример #3
0
 public static void CancelOrders(GameUnit unit)
 {
     unit.MovingPath.RemoveAll(x => x != null);
     GameOrderManager.RemoveMarks(unit);
     GameMoveManager.CancelOrders(unit);
 }