Пример #1
0
        public override Order Clone()
        {
            FollowOrder order = new FollowOrder();

            order.followTarget = followTarget;

            return(order);
        }
Пример #2
0
        public void PrepareToCarryUnit(Unit unit)
        {
            if (!unit || !unit.IsInMyTeam(selfUnit) || !unit.data.canBeCarried)
            {
                return;
            }

            var order = new FollowOrder
            {
                followTarget = selfUnit.transform
            };

            unit.AddOrder(order, false);

            if (!unitsToTake.Contains(unit))
            {
                unitsToTake.Add(unit);
            }
        }