public override Order Clone() { FollowOrder order = new FollowOrder(); order.followTarget = followTarget; return(order); }
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); } }