예제 #1
0
        private static void DrawBuffs()
        {
            var drawBuffs = MenuLocal.Item(GetPcModeStringValue + "DrawBuffs").GetValue <StringList>().SelectedIndex;

            if ((drawBuffs == 1 | drawBuffs == 3) && ObjectManager.Player.HasBlueBuff())
            {
                if (BlueBuff.EndTime >= Game.Time)
                {
                    var circle1 = new CommonGeometry.Circle2(new Vector2(ObjectManager.Player.Position.X + 3, ObjectManager.Player.Position.Y - 3), 170f, Game.Time - BlueBuff.StartTime, BlueBuff.EndTime - BlueBuff.StartTime).ToPolygon();
                    circle1.Draw(Color.Black, 4);

                    var circle = new CommonGeometry.Circle2(ObjectManager.Player.Position.To2D(), 170f, Game.Time - BlueBuff.StartTime, BlueBuff.EndTime - BlueBuff.StartTime).ToPolygon();
                    circle.Draw(Color.Blue, 4);
                }
            }

            if ((drawBuffs == 2 || drawBuffs == 3) && ObjectManager.Player.HasRedBuff())
            {
                if (RedBuff.EndTime >= Game.Time)
                {
                    var circle1 = new CommonGeometry.Circle2(new Vector2(ObjectManager.Player.Position.X + 3, ObjectManager.Player.Position.Y - 3), 150f, Game.Time - RedBuff.StartTime, RedBuff.EndTime - RedBuff.StartTime).ToPolygon();
                    circle1.Draw(Color.Black, 4);

                    var circle = new CommonGeometry.Circle2(ObjectManager.Player.Position.To2D(), 150f, Game.Time - RedBuff.StartTime, RedBuff.EndTime - RedBuff.StartTime).ToPolygon();
                    circle.Draw(Color.Red, 4);
                }
            }
        }
예제 #2
0
 private static void DrawViciousStrikesBuffTime()
 {
     if (MenuLocal.Item(GetPcModeStringValue + "Draw.W.BuffTime").GetValue <StringList>().SelectedIndex == 1 && CommonHelper.OlafHaveFrenziedStrikes)
     {
         if (OlafViciousStrikes.EndTime >= Game.Time)
         {
             var circle1 = new CommonGeometry.Circle2(new Vector2(ObjectManager.Player.Position.X + 3, ObjectManager.Player.Position.Y - 3), 190f, Game.Time * 100 - OlafViciousStrikes.StartTime * 100, OlafViciousStrikes.EndTime * 100 - OlafViciousStrikes.StartTime * 100).ToPolygon();
             circle1.Draw(Color.Black, 4);
             var circle = new CommonGeometry.Circle2(ObjectManager.Player.Position.To2D(), 190f, Game.Time * 100 - OlafViciousStrikes.StartTime * 100, OlafViciousStrikes.EndTime * 100 - OlafViciousStrikes.StartTime * 100).ToPolygon();
             circle.Draw(Color.GreenYellow, 4);
         }
     }
 }
예제 #3
0
        private static void DrawRagnarokBuffTime()
        {
            if (MenuLocal.Item(GetPcModeStringValue + "Draw.R.BuffTime").GetValue <StringList>().SelectedIndex == 1 && CommonHelper.OlafHaveRagnarok)
            {
                if (OlafRagnarok.EndTime >= Game.Time)
                {
                    var circle1 = new CommonGeometry.Circle2(new Vector2(ObjectManager.Player.Position.X + 3, ObjectManager.Player.Position.Y - 3), 220f, Game.Time * 100 - OlafRagnarok.StartTime * 100, OlafRagnarok.EndTime * 100 - OlafRagnarok.StartTime * 100).ToPolygon();
                    circle1.Draw(Color.Black, 4);

                    var circle = new CommonGeometry.Circle2(ObjectManager.Player.Position.To2D(), 220f, Game.Time * 100 - OlafRagnarok.StartTime * 100, OlafRagnarok.EndTime * 100 - OlafRagnarok.StartTime * 100).ToPolygon();
                    circle.Draw(Color.DarkRed, 4);
                }
            }
        }
예제 #4
0
        private static void DrawAxeTimes()
        {
            if (PlayerObjects.AxeObject == null)
            {
                return;
            }

            var drawAxePosition = MenuLocal.Item(GetPcModeStringValue + "Draw.AxePosition").GetValue <StringList>().SelectedIndex;

            var exTime = TimeSpan.FromSeconds(PlayerObjects.EndTime - Game.Time).TotalSeconds;
            var color  = exTime > 4 ? Color.White : Color.Red;

            switch (drawAxePosition)
            {
            case 1:
            {
                var circle1 = new CommonGeometry.Circle2(new Vector2(PlayerObjects.AxeObject.Position.X + 3, PlayerObjects.AxeObject.Position.Y - 3), 150f, Game.Time * 100 - Champion.PlayerObjects.StartTime * 100, Champion.PlayerObjects.EndTime * 100 - Champion.PlayerObjects.StartTime * 100).ToPolygon();
                circle1.Draw(Color.Black, 4);

                var circle = new CommonGeometry.Circle2(PlayerObjects.AxeObject.Position.To2D(), 150f, Game.Time * 100 - Champion.PlayerObjects.StartTime * 100, Champion.PlayerObjects.EndTime * 100 - Champion.PlayerObjects.StartTime * 100).ToPolygon();
                circle.Draw(TimeSpan.FromSeconds(PlayerObjects.EndTime - Game.Time).TotalSeconds > 4 ? Color.White : Color.Red, 4);
                break;
            }

            case 2:
            {
                var startpos = ObjectManager.Player.Position.To2D();
                var endpos   = Champion.PlayerObjects.AxeObject.Position.To2D();
                if (startpos.Distance(endpos) > 100)
                {
                    var endpos1 = Champion.PlayerObjects.AxeObject.Position + (startpos - endpos).Normalized().Rotated(25 * (float)Math.PI / 180).To3D() * 75;
                    var endpos2 = Champion.PlayerObjects.AxeObject.Position + (startpos - endpos).Normalized().Rotated(-25 * (float)Math.PI / 180).To3D() * 75;

                    var x1 = new LeagueSharp.Common.Geometry.Polygon.Line(startpos, endpos);
                    x1.Draw(color, 1);
                    var y1 = new LeagueSharp.Common.Geometry.Polygon.Line(endpos.To3D(), endpos1);
                    y1.Draw(color, 2);
                    var z1 = new LeagueSharp.Common.Geometry.Polygon.Line(endpos.To3D(), endpos2);
                    z1.Draw(color, 2);
                }
                break;
            }

            case 3:
            {
                var circle1 = new CommonGeometry.Circle2(new Vector2(PlayerObjects.AxeObject.Position.X + 3, PlayerObjects.AxeObject.Position.Y - 3), 150f, Game.Time * 100 - Champion.PlayerObjects.StartTime * 100, Champion.PlayerObjects.EndTime * 100 - Champion.PlayerObjects.StartTime * 100).ToPolygon();
                circle1.Draw(Color.Black, 4);

                var circle = new CommonGeometry.Circle2(PlayerObjects.AxeObject.Position.To2D(), 150f, Game.Time * 100 - Champion.PlayerObjects.StartTime * 100, Champion.PlayerObjects.EndTime * 100 - Champion.PlayerObjects.StartTime * 100).ToPolygon();
                circle.Draw(TimeSpan.FromSeconds(PlayerObjects.EndTime - Game.Time).TotalSeconds > 4 ? Color.White : Color.Red, 4);

                var startpos = ObjectManager.Player.Position.To2D();
                var endpos   = Champion.PlayerObjects.AxeObject.Position.To2D();
                if (startpos.Distance(endpos) > 100)
                {
                    var endpos1 = Champion.PlayerObjects.AxeObject.Position + (startpos - endpos).Normalized().Rotated(25 * (float)Math.PI / 180).To3D() * 75;
                    var endpos2 = Champion.PlayerObjects.AxeObject.Position + (startpos - endpos).Normalized().Rotated(-25 * (float)Math.PI / 180).To3D() * 75;

                    var x1 = new LeagueSharp.Common.Geometry.Polygon.Line(startpos, endpos);
                    x1.Draw(color, 1);
                    var y1 = new LeagueSharp.Common.Geometry.Polygon.Line(endpos.To3D(), endpos1);
                    y1.Draw(color, 2);
                    var z1 = new LeagueSharp.Common.Geometry.Polygon.Line(endpos.To3D(), endpos2);
                    z1.Draw(color, 2);
                }

                var line = new Geometry.Polygon.Line(ObjectManager.Player.Position, PlayerObjects.AxeObject.Position, ObjectManager.Player.Distance(PlayerObjects.AxeObject.Position));
                line.Draw(color, 2);
                break;
            }
            }

            if (MenuLocal.Item(GetPcModeStringValue + "Draw.AxeTime").GetValue <bool>())
            {
                var time    = TimeSpan.FromSeconds(PlayerObjects.EndTime - Game.Time);
                var pos     = Drawing.WorldToScreen(PlayerObjects.AxeObject.Position);
                var display = $"{time.Seconds:D1}";

                SharpDX.Color vTimeColor = time.TotalSeconds > 4 ? SharpDX.Color.White : SharpDX.Color.Red;
                DrawText(AxeDisplayText, display, (int)pos.X - display.Length, (int)pos.Y - 105, vTimeColor);
            }
        }