public override Activity Tick(Actor self) { if (IsCanceled || !target.IsValidFor(self) || !attack.IsReachableTarget(target, allowMove)) { return(NextActivity); } attack.DoAttack(self, target); return(this); }
public override Activity Tick(Actor self) { if (IsCanceled || !target.IsValidFor(self)) { return(NextActivity); } attack.DoAttack(self, target); return(this); }
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); }