Exemplo n.º 1
0
        private void Drawing_OnDraw(EventArgs args)
        {
            if (this.Target == null)
            {
                return;
            }

            Vector2 screenPos;

            if (Drawing.WorldToScreen(this.Target.NetworkPosition, out screenPos))
            {
                Drawing.DrawCircle(screenPos, 100, 12, Color.Yellow);
                Console.WriteLine("Draw0 {0}", screenPos);
            }
            if (Drawing.WorldToScreen(Prediction.PredictPosition(this.Target, 400), out screenPos))
            {
                Drawing.DrawCircle(screenPos, 100, 12, Color.Red);
                Console.WriteLine("Draw1 {0}", screenPos);
            }
            if (Drawing.WorldToScreen(Prediction.PredictPosition(this.Target, 1700), out screenPos))
            {
                Drawing.DrawCircle(screenPos, 100, 12, Color.Blue);
                Console.WriteLine("Draw2 {0}", screenPos);
            }
        }
Exemplo n.º 2
0
        public override async Task ExecuteAsync(Unit target, CancellationToken tk = default(CancellationToken))
        {
            var invokeDelay = await this.UseInvokeAbilityAsync(target, tk);

            Log.Debug($"Sunstrike {this.ExtraDelay()} - {invokeDelay}");
            await Await.Delay(Math.Max(0, this.ExtraDelay() - invokeDelay), tk);

            this.Ability.UseAbility(Prediction.PredictPosition(target, this.Delay));
        }