Exemplo n.º 1
0
        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);
                }
            });
        }
Exemplo n.º 2
0
 public AutoTargetingFunction(AutoTargetingOptions options)
 {
     this.Options  = options;
     this.Governor = new RateGovernor(TimeSpan.FromSeconds(options.Source.Element is MainCharacter ? 0 : .5));
 }
Exemplo n.º 3
0
 public AutoTargetingFunction(AutoTargetingOptions options)
 {
     this.options  = options;
     this.Governor = new RateGovernor(TimeSpan.FromSeconds(.1));
 }