public AutoTargetingFunction(AutoTargetingOptions options) { this.Options = options; Delay = options.Source.Element is MainCharacter ? (int)Time.CurrentTime.Increment.TotalMilliseconds : 100; this.Added.SubscribeOnce(async() => { while (this.Lifetime.IsExpired == false) { Evaluate(); await Time.CurrentTime.DelayOrYield(Delay); } }); }
public AutoTargetingFunction(AutoTargetingOptions options) { this.Options = options; this.Governor = new RateGovernor(TimeSpan.FromSeconds(options.Source.Element is MainCharacter ? 0 : .5)); }
public AutoTargetingFunction(AutoTargetingOptions options) { this.options = options; this.Governor = new RateGovernor(TimeSpan.FromSeconds(.1)); }