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


C# Obj_AI_Base.IsInRange方法代码示例

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


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

示例1: WithinRange

 public static bool WithinRange(Obj_AI_Base target, float range)
 {
     return ((range == SpellManager.Q.Range && !target.HasBuff("urgotcorrosivedebuff") && target.IsValidTarget(range))
         || (range == SpellManager.Q.Range && target.HasBuff("urgotcorrosivedebuff") && target.IsValidTarget(SpellManager.Q2.Range))
         || (range != SpellManager.Q.Range && target.IsValidTarget(range)))
         && ((range == SpellManager.Q.Range && !target.HasBuff("urgotcorrosivedebuff") && target.IsInRange(Champion, range))
         || (range == SpellManager.Q.Range && target.HasBuff("urgotcorrosivedebuff") && target.IsInRange(Champion, SpellManager.Q2.Range))
         || (range != SpellManager.Q.Range && target.IsInRange(Champion, range)));
 }
开发者ID:CounterFX,项目名称:EloBuddy-Addons,代码行数:9,代码来源:TargetManager.cs

示例2: CastW

 public static void CastW(Obj_AI_Base random)
 {
     if (!random.IsInRange(Player.Instance, Q.Range)
         && W.IsReady()) W.Cast();
     else if (random.IsInRange(Player.Instance, 650)
              && E.IsReady()
              && W.IsReady()) W.Cast();
     else if (!random.IsInRange(Player.Instance, Player.Instance.GetAutoAttackRange())
         && random.HealthPercent < 20 && Player.Instance.HealthPercent > 80) W.Cast();
 }
开发者ID:WeinerCH,项目名称:EB,代码行数:10,代码来源:EveSpells.cs

示例3: Interrupter_OnInterruptableSpell

 private static void Interrupter_OnInterruptableSpell(Obj_AI_Base sender, Interrupter.InterruptableSpellEventArgs e)
 {
     if (Settings.interruptE && !sender.IsDead && !sender.IsInvulnerable && !sender.IsZombie && sender.IsEnemy && e.DangerLevel >= DangerLevel.Medium && sender.IsInRange(Player.Instance, SpellManager.E.Range) && SpellManager.E.IsReady())
     {
         SpellManager.E.Cast(sender);
     }
 }
开发者ID:TopGunner,项目名称:EloBuddy,代码行数:7,代码来源:Program.cs

示例4: castE

        public static void castE(Obj_AI_Base target)
        {
            if (!target.IsValidTarget(E.Range + 50) || !E.IsReady()) return;
            var barrelNearPlayer = Barrrels.GetBarrels().FirstOrDefault(b => b.IsInRange(Player.Instance, Q.Range + 150));
            if (barrelNearPlayer == null)
            {
                var sliderClose = GetSliderValue(MenuTypes.Combo, "eComboRangeClose");
                var sliderFar = GetSliderValue(MenuTypes.Combo, "eComboRangeFar");
                E.Cast(target.IsInRange(Player.Instance, 650) ? Player.Instance.Position.Extend(target, sliderClose).To3D() : Player.Instance.Position.Extend(target, sliderFar).To3D());
            }
            else if (barrelNearPlayer.Health <= 1 && barrelNearPlayer.Health >= 1)
            {
                var pred = E.GetPrediction(target);
                var barrel = Barrrels.GetBarrels().FirstOrDefault(b => b.Distance(pred.CastPosition) <= 380);

                if (barrel == null)
                {
                    var predpos = pred.CastPosition;
                    if (Q.IsReady() && predpos.Distance(barrelNearPlayer) <= 825)
                    {
                        E.Cast(predpos);
                        CastEBetween();
                        var killBC = Barrrels.GetKillBarrelClosest();
                        var barrelWithENemy = Barrrels.GetBarrelWithEemyInside();
                        if (killBC != null && barrelWithENemy != null && killBC.Distance(barrelWithENemy) < 825)
                        {
                            Q.Cast(killBC);
                        }
                    }
                }
            }
        }
开发者ID:,项目名称:,代码行数:32,代码来源:

示例5: Botrk

 private static void Botrk(Obj_AI_Base enemy)
 {
     if (botrk.IsOwned())
         if (enemy.IsValidTarget(botrk.Range)
             && !enemy.IsInRange(Xin, Xin.GetAutoAttackRange())
             && botrk.IsReady()) botrk.Cast(enemy);
 }
开发者ID:WeinerCH,项目名称:EB,代码行数:7,代码来源:Combo.cs

示例6: Sable

 private static void Sable(Obj_AI_Base enemy)
 {
     if (sable.IsOwned())
         if (enemy.IsValidTarget(sable.Range)
             && !enemy.IsInRange(Xin, Xin.GetAutoAttackRange())
             && sable.IsReady()) sable.Cast(enemy);
 }
开发者ID:WeinerCH,项目名称:EB,代码行数:7,代码来源:Combo.cs

示例7: CastSmite

 public static void CastSmite(Obj_AI_Base random)
 {
     if (random.IsInRange(Player.Instance, Smite.Range)
         && Smite.IsReady()
         && Monsters.Contains(random.BaseSkinName)
         && (GetHealthPrediction(random, Smite.CastDelay) < EveDamages.Smite(random))) Smite.Cast(random);
 }
开发者ID:WeinerCH,项目名称:EB,代码行数:7,代码来源:EveSpells.cs

示例8: Interrupter_OnInterruptableSpell

 private static void Interrupter_OnInterruptableSpell(Obj_AI_Base sender, Interrupter.InterruptableSpellEventArgs e)
 {
     if (sender.IsEnemy && SpellManager.E.IsReady() && e.DangerLevel >= DangerLevel.High && sender.HealthPercent > 0 && Config.ESettings.interruptE && sender.IsInRange(Player.Instance, SpellManager.E.Range))
     {
         SpellManager.E.Cast(sender);
     }
 }
开发者ID:denizereer3,项目名称:EloBuddy,代码行数:7,代码来源:Program.cs

示例9: Dash_OnDash

 internal static void Dash_OnDash(Obj_AI_Base sender, Dash.DashEventArgs e)
 {
     Spell.Skillshot W = SpellManager.W;
     if (Settings.antiDash && W.IsReady() && sender.IsValid && sender.IsEnemy && !sender.IsDead && !sender.IsInvulnerable && !sender.IsZombie && sender.IsInRange(Player.Instance, W.Range))
     {
         if (Player.Instance.Distance(e.EndPos) < Player.Instance.Distance(e.StartPos))
             W.Cast(sender);
         else if (Settings.antiDashOffensive)
             W.Cast(sender);
     }
 }
开发者ID:tmvpf12,项目名称:EloBuddy,代码行数:11,代码来源:PermaActive.cs

示例10: UnkillableMinion

 private static void UnkillableMinion(Obj_AI_Base target, Orbwalker.UnkillableMinionArgs args)
 {
     if (Config.Modes.Harass.Mana >= Player.Instance.ManaPercent)
         return;
     if (Settings.useQFarm && Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LastHit) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
     {
         if (SpellManager.Q.IsReady() && target.IsInRange(Player.Instance, SpellManager.Q.Range))
         {
             SpellManager.Q.Cast(target);
         }
     }
 }
开发者ID:denizereer3,项目名称:EloBuddy,代码行数:12,代码来源:Program.cs

示例11: OnUnkillableMinion

        public static void OnUnkillableMinion(Obj_AI_Base target, Orbwalker.UnkillableMinionArgs args)
        {
            if (!Config.Farm.Menu.GetCheckBoxValue("Config.Farm.Q.Unkillable") || Player.Instance.HasBuff("GarenE")) return;

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LastHit) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear))
            {
                if (SpellManager.Q.IsReady() && target.CountEnemyChampionsInRange(550) <= 1 && Player.Instance.HealthPercent >= 30)
                {
                    if (target.IsInRange(Player.Instance, Player.Instance.GetAutoAttackRange()))
                    {
                        SpellManager.Q.Cast();
                        Orbwalker.ResetAutoAttack();
                        Core.DelayAction(() => Player.IssueOrder(GameObjectOrder.AttackTo, target), Config.Farm.Menu.GetSliderValue("Config.Farm.Q.Delay"));
                    }
                }
            }
        }
开发者ID:,项目名称:,代码行数:17,代码来源:

示例12: CountVenom

        public static int CountVenom(Obj_AI_Base obj)
        {
            var i = 0;
            if (obj.IsInRange(Twitch, SpellHandler.E.Range))
            {
                var particle = ObjectManager.Get<Obj_GeneralParticleEmitter>().Where(x => x.Name.Contains("twitch_poison_counter")).FirstOrDefault();

                if (particle == null) i = 0;

                switch (particle.Name)
                {
                    case "twitch_poison_counter_01.troy":
                        i = 1;
                        break;

                    case "twitch_poison_counter_02.troy":
                        i = 2;
                        break;

                    case "twitch_poison_counter_03.troy":
                        i = 3;
                        break;

                    case "twitch_poison_counter_04.troy":
                        i = 4;
                        break;

                    case "twitch_poison_counter_05.troy":
                        i = 5;
                        break;

                    case "twitch_poison_counter_06.troy":
                        i = 6;
                        break;
                }
            }
            else
            {
                i = 0;
            }
            return i;
        }
开发者ID:WeinerCH,项目名称:EB,代码行数:42,代码来源:Brain.cs

示例13: OnProcessSpellCast

        private static void OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (Settings.autoInterrupt && sender.IsEnemy && sender is AIHeroClient && sender.IsInRange(Player.Instance, W.Range))
            {
                var attacker = sender as AIHeroClient;
                if (attacker == null)
                    return;

                var slot = attacker.GetSpellSlotFromName(args.SData.Name);
                if (slot == SpellSlot.Unknown)
                    return;

                switch (attacker.ChampionName)
                {
                    case "Fiddlesticks":
                    case "Galio":
                    case "Janna":
                    case "Karthus":
                    case "Katarina":
                    case "Malzahar":
                    case "MissFortune":
                    case "Nunu":
                    case "Pantheon":
                    case "TwistedFate":
                    case "Warwick":
                    case "Caitlyn":
                    case "Shen":
                        if (slot == SpellSlot.R)
                        {
                            if(W.IsReady())
                                W.Cast(attacker.Position);
                        }
                        break;
                }

            }
        }
开发者ID:denizereer3,项目名称:EloBuddy,代码行数:37,代码来源:SpellManager.cs

示例14: CastQ

 public static void CastQ(Obj_AI_Base random)
 {
     if (random.IsInRange(Player.Instance, Q.Range)
         && Q.IsReady()) Q.Cast();
 }
开发者ID:WeinerCH,项目名称:EB,代码行数:5,代码来源:EveSpells.cs

示例15: CastE

 public static void CastE(Obj_AI_Base random)
 {
     if (random.IsInRange(Player.Instance, E.Range)
         && E.IsReady()) E.Cast(random);
 }
开发者ID:WeinerCH,项目名称:EB,代码行数:5,代码来源:EveSpells.cs


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