当前位置: 首页>>代码示例>>C#>>正文


C# AIHeroClient.LSDistance方法代码示例

本文整理汇总了C#中AIHeroClient.LSDistance方法的典型用法代码示例。如果您正苦于以下问题:C# AIHeroClient.LSDistance方法的具体用法?C# AIHeroClient.LSDistance怎么用?C# AIHeroClient.LSDistance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AIHeroClient的用法示例。


在下文中一共展示了AIHeroClient.LSDistance方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ChampionInfo

 public ChampionInfo(AIHeroClient hero, bool ally)
 {
     index++;
     int textoffset = index * 50;
     _hero = hero;
     Render.Text text = new Render.Text(
         new Vector2(), _hero.ChampionName, 20,
         ally
             ? new Color { R = 205, G = 255, B = 205, A = 255 }
             : new Color { R = 255, G = 205, B = 205, A = 255 })
     {
         PositionUpdate =
             () =>
                 Drawing.WorldToScreen(
                     ObjectManager.Player.Position.LSExtend(_hero.Position, 300 + textoffset)),
         VisibleCondition = delegate
         {
             float dist = _hero.LSDistance(ObjectManager.Player.Position);
             return Program.Instance().ShowChampionNames && !_hero.IsDead &&
                    Game.Time - _lineStart < Program.Instance().LineDuration &&
                    (!_hero.IsVisible || !Render.OnScreen(Drawing.WorldToScreen(_hero.Position))) &&
                    dist < Program.Instance().Radius && dist > 300 + textoffset;
         },
         Centered = true,
         OutLined = true,
     };
     text.Add(1);
     _line = new Render.Line(
         new Vector2(), new Vector2(), 5,
         ally ? new Color { R = 0, G = 255, B = 0, A = 125 } : new Color { R = 255, G = 0, B = 0, A = 125 })
     {
         StartPositionUpdate = () => Drawing.WorldToScreen(ObjectManager.Player.Position),
         EndPositionUpdate = () => Drawing.WorldToScreen(_hero.Position),
         VisibleCondition =
             delegate
             {
                 return !_hero.IsDead && Game.Time - _lineStart < Program.Instance().LineDuration &&
                        _hero.LSDistance(ObjectManager.Player.Position) < (Program.Instance().Radius + 1000);
             }
     };
     _line.Add(0);
     Render.Line minimapLine = new Render.Line(
         new Vector2(), new Vector2(), 2,
         ally ? new Color { R = 0, G = 255, B = 0, A = 255 } : new Color { R = 255, G = 0, B = 0, A = 255 })
     {
         StartPositionUpdate = () => Drawing.WorldToMinimap(ObjectManager.Player.Position),
         EndPositionUpdate = () => Drawing.WorldToMinimap(_hero.Position),
         VisibleCondition =
             delegate
             {
                 return Program.Instance().DrawMinimapLines && !_hero.IsDead && Game.Time - _lineStart < Program.Instance().LineDuration;
             }
     };
     minimapLine.Add(0);
     Game.OnUpdate += Game_OnGameUpdate;
     OnEnterRange += ChampionInfo_OnEnterRange;
 }
开发者ID:CainWolf,项目名称:PortAIO,代码行数:57,代码来源:Program.cs

示例2: GetDamage

 public override float GetDamage(AIHeroClient enemy)
 {
     var baseDamage = base.GetDamage(enemy);
     return enemy.HasBuff("brandablaze") || _brandE.CanBeCast() && enemy.LSDistance(ObjectManager.Player) < 650
         ? baseDamage*1.25f
         : baseDamage;
 }
开发者ID:yashine59fr,项目名称:PortAIO-1,代码行数:7,代码来源:BrandW.cs

示例3: CastQ

 private static void CastQ(AIHeroClient target)
 {
     var ext = 0;
     if (player.LSDistance(target.ServerPosition) > 400)
     {
         ext = 100;
     }
     var pred = Q.GetPrediction(target, true);
     var pos = player.Position.LSExtend(pred.CastPosition, player.LSDistance(pred.CastPosition) + ext);
     if (pred.CastPosition.IsValid() && target.LSDistance(pos) < player.LSDistance(target) &&
         pred.Hitchance >= HitChance.Medium)
     {
         //Console.WriteLine(2 + " - " + " - " + pred.Hitchance);
         Q.Cast(pos);
     }
 }
开发者ID:,项目名称:,代码行数:16,代码来源:

示例4: Execute

 public override void Execute(AIHeroClient target)
 {
     var distance = target.LSDistance(ObjectManager.Player);
         //Todo: make him use fireminions even in range, just for showoff and potential AOE. Check if hes on fire too though
     if (distance < 950 && distance > 650 && Program.getMiscMenuCB("eMinion"))
     {
         var fireMinion =
             MinionManager.GetMinions(650, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.None)
                 .Where(minion => minion.HasBuff("brandablaze") && minion.LSDistance(target) < 300)
                 .MinOrDefault(minion => minion.LSDistance(target));
         if (fireMinion != null)
         {
             if (Cast(fireMinion) == CastStates.SuccessfullyCasted && !target.HasSpellShield())
                 Provider.SetMarked(target);
         }
     }
     if (distance < 650)
     {
         if (Cast(target) == CastStates.SuccessfullyCasted && !target.HasSpellShield())
             Provider.SetMarked(target);
     }
 }
开发者ID:yashine59fr,项目名称:PortAIO,代码行数:22,代码来源:BrandE.cs

示例5: castQ

 public void castQ(AzirMain azir, AIHeroClient target, bool useQ, int nSoldiersToQ)
 {
     //revisar entero
     if (target.LSDistance(HeroManager.Player) <= azir.Spells.Q.Range)
     {
         if (target.isRunningOfYou())
         {
             var predpos = Prediction.GetPrediction(target, 500f);
             if (azir.Hero.LSDistance(predpos.CastPosition) <= azir.Spells.Q.Range)
             {
                 azir.Spells.Q.Cast((predpos.CastPosition));
             }
         }
         else
         {
             var predq = Q.GetPrediction(target);
             if (predq.Hitchance >= HitChance.High)
             {
                 Q.Cast(predq.CastPosition);
             }
         }
     }
 }
开发者ID:,项目名称:,代码行数:23,代码来源:

示例6: Combo

        private static void Combo(AIHeroClient target)
        {
            if (target != null && target.IsVisible && target.IsHPBarRendered)
            {
                var overkill = _player.LSGetSpellDamage(target, SpellSlot.Q) + _player.LSGetSpellDamage(target, SpellSlot.E) + _player.LSGetAutoAttackDamage(target, true) * 2;
                var doubleu = _player.Spellbook.GetSpell(SpellSlot.W);

                if (getCheckBoxItem(comboMenu, "UseUlt") && UltStage == UltCastStage.First && (overkill < target.Health || (!_w.IsReady() && doubleu.Cooldown > 2f && _player.LSGetSpellDamage(target, SpellSlot.Q) < target.Health && target.LSDistance(_player.Position) > 400)))
                {
                    if ((target.LSDistance(_player.Position) > 700 && target.MoveSpeed > _player.MoveSpeed) || target.LSDistance(_player.Position) > 800)
                    {
                        CastW(target);
                        _w.Cast();

                    }
                    _r.Cast(target);
                }

                else
                {
                    if (target != null && getCheckBoxItem(comboMenu, "UseIgnitecombo") && _igniteSlot != SpellSlot.Unknown &&
                            _player.Spellbook.CanUseSpell(_igniteSlot) == SpellState.Ready)
                    {
                        if (ComboDamage(target) > target.Health || target.HasBuff("zedulttargetmark"))
                        {
                            _player.Spellbook.CastSpell(_igniteSlot, target);
                        }
                    }
                    if (target != null && ShadowStage == ShadowCastStage.First && getCheckBoxItem(comboMenu, "UseWC") &&
                            target.LSDistance(_player.Position) > 400 && target.LSDistance(_player.Position) < 1300)
                    {
                        CastW(target);
                    }
                    if (target != null && ShadowStage == ShadowCastStage.Second && getCheckBoxItem(comboMenu, "UseWC") && target.LSDistance(WShadow.ServerPosition) < target.LSDistance(_player.Position))
                    {
                        _w.Cast();
                    }
                    CastE();
                    CastQ(target);
                }
            }
        }
开发者ID:yashine59fr,项目名称:PortAIO-1,代码行数:42,代码来源:Program.cs

示例7: OnInterrupt

        private static void OnInterrupt(AIHeroClient sender, Interrupter2.InterruptableTargetEventArgs args)
        {
            if (!getCheckBoxItem(MenuConfig.misc, "autoeint")) return;
            if (sender.IsMe || sender.IsAlly) return;
            if (sender.LSDistance(Player) <= Em.Range)
            {
                if (!Ismelee())
                {
                    R.Cast();
                }

                if (Ismelee())
                {
                    Em.Cast(sender);
                }
            }
        }
开发者ID:yashine59fr,项目名称:PortAIO,代码行数:17,代码来源:Jayce.cs

示例8: useQSmart

        public static void useQSmart(AIHeroClient target, bool onlyEmp = false)
        {
            if (!Q.IsReady() || target == null)
                return;
            if (isQEmpovered())
            {
                if (canCastFarQ())
                {
                    PredictionOutput po = QEmp.GetPrediction(target); //QEmp.GetPrediction(target, true);
                    if (po.Hitchance >= LeagueSharp.Common.HitChance.Medium)
                    {
                        QEmp.Cast(po.CastPosition);
                        return;
                    }
                }
                else//dashing
                {
                    Vector3 endPos = getDashEndPos();
                    if (Player.LSDistance(endPos) < 40 && target.LSDistance(endPos) < QCir.Range)
                    {
                        QCir.Cast(target.Position);
                        return;
                    }
                }
            }
            else if (!onlyEmp)
            {
                if (canCastFarQ())
                {
                    PredictionOutput po = Q.GetPrediction(target);
                    if (po.Hitchance >= LeagueSharp.Common.HitChance.Medium)
                    {
                        Q.Cast(po.CastPosition);
                    }
                    return;

                }
                else//dashing
                {
                    float trueRange = QCir.Range - 10;
                    Vector3 endPos = getDashEndPos();
                    if (Player.LSDistance(endPos) < 40 && target.LSDistance(endPos) < QCir.Range)
                    {
                        QCir.Cast(target.Position);
                        return;
                    }
                }
            }
        }
开发者ID:yashine59fr,项目名称:PortAIO,代码行数:49,代码来源:Yasuo.cs

示例9: Interrupter2_OnInterruptableTarget

        private static void Interrupter2_OnInterruptableTarget(
            AIHeroClient sender,
            Interrupter2.InterruptableTargetEventArgs args)
        {
            if (!getCheckBoxItem(miscMenu, "ElTristana.Interrupter"))
            {
                return;
            }

            if (sender.LSDistance(Player) <= spells[Spells.R].Range)
            {
                spells[Spells.R].Cast(sender);
            }
        }
开发者ID:,项目名称:,代码行数:14,代码来源:

示例10: Interrupter2_OnInterruptableTarget

        /// <summary>
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        private static void Interrupter2_OnInterruptableTarget(
            AIHeroClient sender,
            Interrupter2.InterruptableTargetEventArgs args)
        {
            if (!getCheckBoxItem(miscMenu, "inter"))
            {
                return;
            }

            if (args.DangerLevel != Interrupter2.DangerLevel.High
                || sender.LSDistance(Player) > Q.Range)
            {
                return;
            }

            if (sender.LSIsValidTarget(Q.Range) && args.DangerLevel == Interrupter2.DangerLevel.High
                && Q.IsReady())
            {
                var prediction = Q.GetPrediction(sender);
                if (prediction.Hitchance >= HitChance.High)
                {
                    Q.Cast(sender);
                }
            }
        }
开发者ID:yashine59fr,项目名称:PortAIO-1,代码行数:29,代码来源:AurelionSol.cs

示例11: Interrupter2_OnInterruptableTarget

        private static void Interrupter2_OnInterruptableTarget(
            AIHeroClient sender,
            Interrupter2.InterruptableTargetEventArgs args)
        {
            var useInterrupter = getCheckBoxItem(ElViMenu.miscMenu, "ElVi.misc.Interrupter");
            if (!useInterrupter)
            {
                return;
            }

            if (args.DangerLevel != Interrupter2.DangerLevel.High
                || sender.LSDistance(Player) > Spells[ElVi.Spells.Q].Range)
            {
                return;
            }

            if (Spells[ElVi.Spells.Q].IsReady())
            {
                if (!Spells[ElVi.Spells.Q].IsCharging)
                {
                    Spells[ElVi.Spells.Q].StartCharging();
                }
                else
                {
                    Spells[ElVi.Spells.Q].Cast(sender);
                }
            }

            if (Spells[ElVi.Spells.R].CanCast(sender) && args.DangerLevel >= Interrupter2.DangerLevel.High)
            {
                Spells[ElVi.Spells.R].Cast(sender);
            }
        }
开发者ID:yMeliodasNTD,项目名称:PortAIO,代码行数:33,代码来源:Vi.cs

示例12: Interrupter2_OnInterruptableTarget

 private static void Interrupter2_OnInterruptableTarget(AIHeroClient sender,
     Interrupter2.InterruptableTargetEventArgs args)
 {
     if (!getCheckBoxItem(rMenu, "OPTI"))
         return;
     if (R.IsReady() && sender.LSDistance(BallPos) < R.Range)
     {
         R.Cast();
         Program.debug("interupt");
     }
     else if (Q.IsReady() && Player.Mana > RMANA + QMANA && sender.LSIsValidTarget(Q.Range))
         Q.Cast(sender.ServerPosition);
 }
开发者ID:yMeliodasNTD,项目名称:PortAIO,代码行数:13,代码来源:Program.cs

示例13: SomeDash

        private static void SomeDash(AIHeroClient target)
        {
            if (!Getkeybindvalue(keybindsMenu, "shycombo") || !target.IsValid<AIHeroClient>() || uo)
                return;

            if (riventarget() == null || !r.IsReady())
                return;

            if (flash.IsReady() && w.IsReady() && (canburst() || shy()) && getBoxItem(r1Menu, "multib") != 2)
            {
                if (e.IsReady() && target.LSDistance(player.ServerPosition) <= e.Range + w.Range + 275)
                {
                    if (target.LSDistance(player.ServerPosition) > e.Range + truerange + 50)
                    {
                        e.Cast(target.ServerPosition);

                        if (!uo)
                            r.Cast();
                    }
                }

                if (!e.IsReady() && target.LSDistance(player.ServerPosition) <= w.Range + 275)
                {
                    if (target.LSDistance(player.ServerPosition) > truerange + 50)
                    {
                        if (!uo)
                            r.Cast();
                    }
                }
            }

            else
            {
                if (e.IsReady() && target.LSDistance(player.ServerPosition) <= e.Range + w.Range - 25)
                {
                    if (target.LSDistance(player.ServerPosition) > truerange + 50)
                    {
                        e.Cast(target.ServerPosition);

                        if (!uo)
                            r.Cast();
                    }
                }

                if (!e.IsReady() && target.LSDistance(player.ServerPosition) <= w.Range - 10)
                {
                    if (!uo)
                        r.Cast();
                }
            }
        }
开发者ID:yashine59fr,项目名称:PortAIO,代码行数:51,代码来源:KurisuRiven.cs

示例14: SpellUseE

        public static void SpellUseE(AIHeroClient target)
        {
            if (!target.CanMove && !target.IsMoving)
            {
                var EPosition = target.ServerPosition.LSExtend(Player.Position, 400);
                _E.Cast(EPosition, true);
                return;
            }

            if (target.LSDistance(Player) > 750)
            {
                var EPosition = target.ServerPosition.LSExtend(Player.Position, 200);
                _E.Cast(EPosition, true);
                return;
            }
            else
            {
                var EPosition = target.ServerPosition;
                _E.Cast(EPosition, true);
                return;
            }
        }
开发者ID:,项目名称:,代码行数:22,代码来源:

示例15: ELogic

        private static void ELogic(AIHeroClient target)
        {
            if (!E.CanCast(target) || target.HasBuffOfType(BuffType.SpellShield)) return;

            var tower = target.GetMostCloseTower();
            if (tower != null && tower.IsAlly && E.CanCast(target) && target.LSDistance(tower)<tower.AttackRange + E.Range)
            {
                if (target.LSDistance(tower) < Player.LSDistance(tower))
                {
                    E.Cast(target);
               //     Chat.Print("E1");
                }
                else
                {
                    E.CastToReverse(target);
               //     Chat.Print("E2");
                }
            }

            var adc = GetAdc();
            if (adc!=null)
            {
                if (target.IsFleeing(Player))
                {
                    E.Cast(target);
                //    Chat.Print("E3");
                }
                else if (target.IsHunting(Player))
                {
                    E.CastToReverse(target);
                //    Chat.Print("E4");
                }
            }
            if (target.LSDistance(Player)>E.Range/2 || Player.HealthPercent<50)
            {
                E.CastToReverse(target);
            //    Chat.Print("E5");
            }
        }
开发者ID:yMeliodasNTD,项目名称:PortAIO,代码行数:39,代码来源:Thresh.cs


注:本文中的AIHeroClient.LSDistance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。