Esempio n. 1
0
            public override Activity Tick(Actor self)
            {
                if (IsCanceled || !target.IsValidFor(self) || !attack.IsReachableTarget(target, allowMove))
                {
                    return(NextActivity);
                }

                attack.DoAttack(self, target);
                return(this);
            }
Esempio n. 2
0
            public override Activity Tick(Actor self)
            {
                // This activity can't move to reacquire hidden targets, so use the
                // Recalculate overload that invalidates hidden targets.
                target = target.RecalculateInvalidatingHiddenTargets(self.Owner);
                if (IsCanceling || !target.IsValidFor(self) || !attack.IsReachableTarget(target, allowMove))
                {
                    return(NextActivity);
                }

                attack.DoAttack(self, target);
                return(this);
            }