예제 #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);
            }
예제 #2
0
            public override Activity Tick(Actor self)
            {
                if (IsCanceled || !target.IsValidFor(self))
                {
                    return(NextActivity);
                }

                attack.DoAttack(self, target);
                return(this);
            }
예제 #3
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);
            }