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); }
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(this); } foreach (var notify in self.TraitsImplementing <INotifyTeslaCharging>()) { notify.Charging(self, target); } if (!string.IsNullOrEmpty(attack.info.ChargeAudio)) { Game.Sound.Play(SoundType.World, attack.info.ChargeAudio, self.CenterPosition); } QueueChild(self, new Wait(attack.info.InitialChargeDelay), true); QueueChild(self, new ChargeFire(attack, target)); return(this); }
public override bool Tick(Actor self) { if (IsCanceling || !attack.CanAttack(self, target)) { return(true); } if (attack.charges == 0) { return(false); } foreach (var notify in self.TraitsImplementing <INotifyTeslaCharging>()) { notify.Charging(self, target); } if (!string.IsNullOrEmpty(attack.info.ChargeAudio)) { Game.Sound.Play(SoundType.World, attack.info.ChargeAudio, self.CenterPosition); } QueueChild(new Wait(attack.info.InitialChargeDelay)); QueueChild(new ChargeFire(attack, target)); return(false); }
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)); }
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); }
public override Activity Tick(Actor self) { if (IsCanceled || !attack.CanAttack(self, target)) { return(NextActivity); } if (attack.charges == 0) { return(this); } foreach (var notify in self.TraitsImplementing <INotifyTeslaCharging>()) { notify.Charging(self, target); } if (!string.IsNullOrEmpty(attack.info.ChargeAudio)) { Game.Sound.Play(SoundType.World, attack.info.ChargeAudio, self.CenterPosition); } return(ActivityUtils.SequenceActivities(new Wait(attack.info.InitialChargeDelay), new ChargeFire(attack, target), this)); }