コード例 #1
0
        protected virtual void OnDraw(EventArgs args)
        {
            if (DrawingsMenu.Item("streamingmode").GetValue <bool>())
            {
                DrawingsMenu.Item("enemycccounter").Permashow(false);
                DrawingsMenu.Item("enemycounter").Permashow(false);
                return;
            }

            DrawingsMenu.Item("enemycccounter").Permashow();
            DrawingsMenu.Item("enemycounter").Permashow();
            if (Environment.TickCount - _lastUpdate > 367)
            {
                DrawingsMenu.Item("enemycccounter").SetValue(Positioning.EnemyCC());
                DrawingsMenu.Item("enemycounter").SetValue(Player.CountEnemiesInRange(2000));
                _lastUpdate = Environment.TickCount;
            }
            if (DrawingsMenu.Item("drawenemyrangecircle").GetValue <bool>())
            {
                foreach (var polygon in Positioning.DangerZone())
                {
                    polygon.Draw(Color.Red, 2);
                }
            }
        }
コード例 #2
0
ファイル: Vayne.cs プロジェクト: MissSecret/LeagueSharp-2
        protected override void OnDraw(EventArgs args)
        {
            base.OnDraw(args);

            if (DrawingsMenu.Item("streamingmode").GetValue <bool>())
            {
                return;
            }
            if (Player.Distance(_preV3) < 1000)
            {
                Drawing.DrawCircle(_preV3, 75, Color.Gold);
            }

            foreach (var hero in HeroManager.Enemies.Where(h => h.IsValidTarget() && h.Distance(Player) < 1400))
            {
                var WProcDMG  = (((hero.Health / Player.GetAutoAttackDamage(hero)) / 3) - 1) * W.GetDamage(hero);
                var AAsNeeded = 0;
                if (W.Instance.State != SpellState.NotLearned)
                {
                    AAsNeeded = (int)((hero.Health - WProcDMG) / Player.GetAutoAttackDamage(hero));
                }
                else
                {
                    AAsNeeded = (int)(hero.Health / Player.GetAutoAttackDamage(hero));
                }
                if (AAsNeeded <= 3)
                {
                    Drawing.DrawText(hero.HPBarPosition.X + 5, hero.HPBarPosition.Y - 30, Color.Gold,
                                     "AAs to kill: " + AAsNeeded);
                }
                else
                {
                    Drawing.DrawText(hero.HPBarPosition.X + 5, hero.HPBarPosition.Y - 30, Color.White,
                                     "AAs to kill: " + AAsNeeded);
                }
            }

            if (!ComboMenu.Item("DrawE").GetValue <bool>() || (Player.UnderTurret(true) && Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo))
            {
                return;
            }
            if (!E.IsReady() || !_condemnEndPosSimplified.IsValid() || Player.CountEnemiesInRange(E.Range) == 0)
            {
                return;
            }
            if (_condemnEndPos.IsCollisionable())
            {
                Geometry.Util.DrawLineInWorld(Player.ServerPosition, _condemnEndPosSimplified, 2, Color.Gold);
                Drawing.DrawCircle(_condemnEndPos, 70, Color.Gold);
            }
            else
            {
                Geometry.Util.DrawLineInWorld(Player.ServerPosition, _condemnEndPosSimplified, 2, Color.White);
                Drawing.DrawCircle(_condemnEndPos, 70, Color.White);
            }
        }