/// <summary> /// Called when league draws itself. /// </summary> /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param> private static void GameDraw(EventArgs args) { var drawQ = GetValue <bool>("DrawQ"); var drawMinQRange = GetValue <bool>("DrawMinQRange"); var drawR = GetValue <bool>("DrawR"); var drawQPred = GetValue <bool>("DrawQPred"); if (drawQ) { Render.Circle.DrawCircle(Player.Position, Q.Range, Q.IsReady() ? Color.Aqua : Color.Red); } if (drawMinQRange) { Render.Circle.DrawCircle(Player.Position, GetValue <Slider>("MinQRange").Value, Color.DarkSlateBlue); } if (drawR) { Render.Circle.DrawCircle(Player.Position, R.Range, R.IsReady() ? Color.Aqua : Color.Red); } if (drawQPred && Q.IsReady() && Target.IsValidTarget(Q.Range)) { QRectangle.Draw(Color.DeepSkyBlue, 3); } }
/// <summary> /// Called when league updates itself. /// </summary> /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param> private static void GameUpdate(EventArgs args) { Target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical); if (Target.IsValidTarget(Q.Range)) { QRectangle.Start = Player.Position.To2D(); QRectangle.End = GetPrediction(Target).CastPosition.To2D(); QRectangle.UpdatePolygon(); } if ((Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo && GetValue <bool>("UseECombo")) || (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed && GetValue <bool>("UseEHarass"))) { if (HeroManager.Enemies.Any(x => x.HasBuff("rocketgrab2"))) { E.Cast(); } } KillSteal(); switch (Orbwalker.ActiveMode) { case Orbwalking.OrbwalkingMode.Mixed: DoHarass(); break; case Orbwalking.OrbwalkingMode.Combo: DoCombo(); break; } }
public QSprite(QBehavior script, QRectangle source) : this(script) { foreach (var atlas in Script.World.Content.Atlases) { foreach (var rects in atlas.Rectangles) { foreach (var qRectangle in rects.Value.Split(source.Width, source.Height)) { if (source == qRectangle) { Source = source; Texture = atlas; Origin = Source.Center; } } } } }
public QImage(QBehavior s, QRectangle source) : this(s) { Source = source; Origin = Source.Center; }