Example #1
0
            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);
            }
Example #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));
            }
Example #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);
            }