public override Activity Tick(Actor self)
            {
                if (ChildActivity != null)
                {
                    ChildActivity = ActivityUtils.RunActivityTick(self, ChildActivity);
                    if (ChildActivity != null)
                    {
                        return(this);
                    }
                }

                if (IsCanceling || !attack.CanAttack(self, target))
                {
                    return(NextActivity);
                }

                if (attack.charges == 0)
                {
                    return(NextActivity);
                }

                attack.DoAttack(self, target);

                QueueChild(self, new Wait(attack.info.ChargeDelay), true);
                return(this);
            }
Exemple #2
0
            public override Activity Tick(Actor self)
            {
                if (IsCanceled || !attack.CanAttack(self, target))
                {
                    return(NextActivity);
                }

                if (attack.charges == 0)
                {
                    return(NextActivity);
                }

                attack.DoAttack(self, target);

                return(ActivityUtils.SequenceActivities(new Wait(attack.info.ChargeDelay), this));
            }
Exemple #3
0
            public override bool Tick(Actor self)
            {
                if (IsCanceling || !attack.CanAttack(self, target))
                {
                    return(true);
                }

                if (attack.charges == 0)
                {
                    return(true);
                }

                attack.DoAttack(self, target);

                QueueChild(new Wait(attack.info.ChargeDelay));
                return(false);
            }