Пример #1
0
            public override Activity Tick(Actor self)
            {
                if (IsCanceled || !target.IsValidFor(self))
                {
                    return(NextActivity);
                }

                if (attack.charges == 0 || !attack.CanAttack(self, target))
                {
                    return(this);
                }

                self.Trait <RenderBuildingCharge>().PlayCharge(self);
                return(Util.SequenceActivities(new Wait(attack.info.InitialChargeDelay), new ChargeFire(attack, target), this));
            }
Пример #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(Util.SequenceActivities(new Wait(attack.info.ChargeDelay), this));
            }