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


C# AttackableUnit.IsValidTarget方法代码示例

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


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

示例1: Orbwalking_AfterAttack

 private void Orbwalking_AfterAttack(AttackableUnit unit, AttackableUnit target)
 {
     if (unit.IsMe)
         if (target.Type == GameObjectType.obj_AI_Hero)
             switch (MenuProvider.Orbwalker.ActiveMode)
             {
                 case Orbwalking.OrbwalkingMode.LastHit:
                     break;
                 case Orbwalking.OrbwalkingMode.Mixed:
                     break;
                 case Orbwalking.OrbwalkingMode.LaneClear:
                     break;
                 case Orbwalking.OrbwalkingMode.Combo:
                     if (MenuProvider.Champion.Combo.UseQ)
                         if (target.IsValidTarget(_q.Range))
                             if (_q.IsReadyPerfectly())
                                 _q.CastOnUnit(target as Obj_AI_Base);
                     break;
                 case Orbwalking.OrbwalkingMode.None:
                     if (MenuProvider.Champion.Harass.UseQ)
                         if (target.IsValidTarget(_q.Range))
                             if (_q.IsReadyPerfectly())
                                 _q.CastOnUnit(target as Obj_AI_Base);
                     break;
                 default:
                     break;
             }
 }
开发者ID:qq2128969,项目名称:LeagueSharp,代码行数:28,代码来源:Teemo.cs

示例2: OnAfterAttack

 protected override void OnAfterAttack(AttackableUnit unit, AttackableUnit target)
 {
     if (!unit.IsMe) return;
     if (unit.IsMe)
     {
         if (myOrbwalker.ActiveMode == myOrbwalker.OrbwalkingMode.Combo)
         {
             if (config.Item("UseWCombo").GetValue<bool>() &&
                 !Player.IsWindingUp &&
                 W.IsReady() &&
                 target.IsValidTarget() && Orbwalking.InAutoAttackRange(target)) W.Cast();
         }
         if (myOrbwalker.ActiveMode == myOrbwalker.OrbwalkingMode.Harass)
         {
             if (config.Item("UseWHarass").GetValue<bool>() &&
                 !Player.IsWindingUp &&
                 W.IsReady() &&
                 target.IsValidTarget() && Orbwalking.InAutoAttackRange(target)) W.Cast();
         }
         if (myOrbwalker.ActiveMode == myOrbwalker.OrbwalkingMode.JungleClear)
         {
             if (target is Obj_AI_Minion && target.Team == GameObjectTeam.Neutral && !target.Name.Contains("Mini") &&
                 !Player.IsWindingUp && Orbwalking.InAutoAttackRange(target))
             {
                 if (W.IsReady() && config.Item("UseWJFarm").GetValue<bool>()) W.Cast();
             }
         }
     }
 }
开发者ID:Shpaamyi,项目名称:LeagueSharp,代码行数:29,代码来源:Sivir.cs

示例3: OnAfterAttack

 protected override void OnAfterAttack(AttackableUnit unit, AttackableUnit target)
 {
     if (!unit.IsMe) return;
     if (unit.IsMe && !Player.IsWindingUp && E.IsReady() && target.IsValidTarget())
     {
         if (myOrbwalker.ActiveMode == myOrbwalker.OrbwalkingMode.Combo && target is Obj_AI_Hero)
         {
             if (config.Item("UseECombo").GetValue<bool>()) E.Cast();
         }
         if (myOrbwalker.ActiveMode == myOrbwalker.OrbwalkingMode.Harass && target is Obj_AI_Hero)
         {
             if (config.Item("UseEHarass").GetValue<bool>()) E.Cast();
         }
         if (myOrbwalker.ActiveMode == myOrbwalker.OrbwalkingMode.LaneClear && target is Obj_AI_Minion)
         {
             if (config.Item("UseEFarm").GetValue<bool>() && (myUtility.PlayerManaPercentage > config.Item("FarmMana").GetValue<Slider>().Value)) E.Cast();
         }
         if (myOrbwalker.ActiveMode == myOrbwalker.OrbwalkingMode.LaneClear)
         {
             if (target is Obj_AI_Turret && target.Team != Player.Team &&
                 config.Item("UseEMisc").GetValue<bool>() &&
                 !Player.IsWindingUp && Orbwalking.InAutoAttackRange(target))
             {
                 E.Cast();
             }
         }
     }
 }
开发者ID:Shpaamyi,项目名称:LeagueSharp,代码行数:28,代码来源:Vi.cs

示例4: OrbwalkingOnAfterAttack

        private static void OrbwalkingOnAfterAttack(AttackableUnit unit, AttackableUnit target)
        {
            if (!unit.IsMe)
            {
                return;
            }
            if (!(target is Obj_AI_Hero))
            {
                return;
            }

            if (!target.IsValidTarget())
            {
                return;
            }

            if (Hydra.IsReady())
            {
                Hydra.Cast();
            }
            else if (Tiamat.IsReady())
            {
                Tiamat.Cast();
            }
        }
开发者ID:qktlfflzk,项目名称:Backup5.4,代码行数:25,代码来源:ChewyMoonShaco.cs

示例5: GetRealAutoAttackRange

 internal static float GetRealAutoAttackRange(this AttackableUnit unit, AttackableUnit target, int AutoAttackRange)
 {
     float result = AutoAttackRange + unit.BoundingRadius;
     if (target.IsValidTarget())
         return result + target.BoundingRadius;
     return result;
 }
开发者ID:zezzy,项目名称:LeagueSharp-1,代码行数:7,代码来源:ExtraExtensions.cs

示例6: AfterAttack

        private void AfterAttack(AttackableUnit unit, AttackableUnit target)
        {
            if (!unit.IsMe || !unit.IsValid<Obj_AI_Base>())
            {
                return;
            }

            if (Variables.Spells[SpellSlot.Q].IsEnabledAndReady(ModesMenuExtensions.Mode.Combo)
                || (Variables.Spells[SpellSlot.Q].IsEnabledAndReady(ModesMenuExtensions.Mode.Harrass)
                && ObjectManager.Player.ManaPercent >= Variables.AssemblyMenu.GetItemValue<Slider>("dzaio.champion.extra.mixed.mana").Value))
            {
                if (target.IsValid<Obj_AI_Hero>() && target.IsValidTarget())
                {
                    Variables.Spells[SpellSlot.Q].CastIfHitchanceEquals(target as Obj_AI_Hero, HitChance.High);
                }
            }

            if (Variables.Spells[SpellSlot.W].IsEnabledAndReady(ModesMenuExtensions.Mode.Combo)
                || (Variables.Spells[SpellSlot.W].IsEnabledAndReady(ModesMenuExtensions.Mode.Harrass)
                && ObjectManager.Player.ManaPercent >= Variables.AssemblyMenu.GetItemValue<Slider>("dzaio.champion.extra.mixed.mana").Value))
            {
                if (target.IsValid<Obj_AI_Hero>() && target.IsValidTarget())
                {
                    Variables.Spells[SpellSlot.W].CastIfHitchanceEquals(target as Obj_AI_Hero, HitChance.High);
                }
            }
        }
开发者ID:DZ191,项目名称:LeagueSharp,代码行数:27,代码来源:Ezreal.cs

示例7: AfterAttack

 internal static void AfterAttack(AttackableUnit unit, AttackableUnit target)
 {
     if (target.IsValidTarget() && unit.IsValid<Obj_AI_Hero>() && unit.IsMe)
     {
         LastTarget = target;
     }
 }
开发者ID:DZ191,项目名称:LeagueSharp,代码行数:7,代码来源:PlayerMonitor.cs

示例8: CustomInAutoattackRange

        public int CustomInAutoattackRange(AttackableUnit target)
        {
            if (Orbwalking.InAutoAttackRange(target))
            {
                return 1;
            }

            if (!target.IsValidTarget())
            {
                return 0;
            }

            //Azir's soldiers can't attack structures.
            if (!(target is Obj_AI_Base))
            {
                return 0;
            }

            var soldierAArange = _soldierAARange + 65 + target.BoundingRadius;
            soldierAArange *= soldierAArange;
            foreach (var soldier in SoldiersManager.ActiveSoldiers)
            {
                if (soldier.Distance(target, true) <= soldierAArange)
                {
                    return 2;
                }
            }

            return 0;
        }
开发者ID:ShineSharp,项目名称:LeagueSharp-4,代码行数:30,代码来源:AzirWalker.cs

示例9: OnAfterAttack

 protected override void OnAfterAttack(AttackableUnit unit, AttackableUnit target)
 {
     if (!unit.IsMe) return;
     if (unit.IsMe )
     {
         if (target is Obj_AI_Hero && target.IsValid<Obj_AI_Hero>() && target.IsValidTarget())
         {
             if (myOrbwalker.ActiveMode == myOrbwalker.OrbwalkingMode.Combo)
             {
                 if (config.Item("UseItemCombo").GetValue<bool>() && !Player.IsWindingUp)
                 {
                     myUtility.UseItems(2, null);
                 }
                 if (config.Item("UseQCombo").GetValue<bool>() && !Player.IsWindingUp && Orbwalking.InAutoAttackRange(target) && Q.IsReady())
                 {
                     Q.Cast();
                 }
             }
         }
         if (myOrbwalker.ActiveMode == myOrbwalker.OrbwalkingMode.LaneClear)
         {
             if (target is Obj_AI_Turret && target.Team != Player.Team &&
                 config.Item("UseQMisc").GetValue<bool>() &&
                 !Player.IsWindingUp && Orbwalking.InAutoAttackRange(target) && Q.IsReady())
             {
                 Q.Cast();
             }
         }
     }
 }
开发者ID:Shpaamyi,项目名称:LeagueSharp,代码行数:30,代码来源:Shyvana.cs

示例10: AfterAttack

 private static void AfterAttack(AttackableUnit unit, AttackableUnit target)
 {
     if (GravesMenu.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo && Helper.Enabled("graves.e.combo") && GravesSpells.E.IsReady()
         && target.IsValidTarget(GravesSpells.Q.Range))
     {
         GravesSpells.E.Cast(Game.CursorPos);
     }
 }
开发者ID:HikigayaAss,项目名称:hikiMarksman,代码行数:8,代码来源:Graves.cs

示例11: CorkiAfterAttack

 private static void CorkiAfterAttack(AttackableUnit unit, AttackableUnit target)
 {
     if (CorkiMenu.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo && Helper.CEnabled("corki.e.combo") && CorkiSpells.E.IsReady()
         && target.IsValidTarget(CorkiSpells.E.Range-100))
     {
         CorkiSpells.E.Cast(target.Position);
     }
 }
开发者ID:HikigayaAss,项目名称:hikiMarksman,代码行数:8,代码来源:Corki.cs

示例12: AfterAttack

 private static void AfterAttack(AttackableUnit unit, AttackableUnit target)
 {
     if (SivirMenu.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo && Helper.SEnabled("sivir.w.combo") && SivirSpells.W.IsReady()
          && target.IsValidTarget(SivirSpells.W.Range))
     {
         SivirSpells.W.Cast();
     }
 }
开发者ID:HikigayaAss,项目名称:hikiMarksman,代码行数:8,代码来源:Sivir.cs

示例13: OnPreAttack

        private static void OnPreAttack(AttackableUnit target, Orbwalker.PreAttackArgs args)
        {
            if (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)) return;

            if (Q.IsReady() && target.IsValidTarget(Q.Range) && !target.IsZombie)
            {
                Q.Cast(target.Position);
            }
        }
开发者ID:Enelx,项目名称:EloBuddy,代码行数:9,代码来源:Ryze.cs

示例14: Tumble

        public static void Tumble(this Vector3 to, AttackableUnit afterTumbleTarget)
        {
            Player.CastSpell(SpellSlot.Q, to);

            if (afterTumbleTarget != null && afterTumbleTarget.IsValidTarget(Player.Instance.GetAutoAttackRange()))
            {
                Player.IssueOrder(GameObjectOrder.AttackUnit, afterTumbleTarget);
            }
        }
开发者ID:strcow,项目名称:CowBuddy,代码行数:9,代码来源:VayneMethods.cs

示例15: InAARange

        /// <summary>
        /// Checks if target is in unit's auto attack range
        /// </summary>
        /// <param name="target">Target</param>
        /// <param name="_unit">Unit to check range</param>
        /// <returns>true if in auto attack range</returns>
        public static bool InAARange(AttackableUnit target, Obj_AI_Base _unit = null)
        {
            if (!target.IsValidTarget())
                return false;

            Obj_AI_Base unit = CorrectUnit(_unit);
            float range = GetRealAARange(target, _unit);
            return Vector2.DistanceSquared(target.Position.To2D(), unit.ServerPosition.To2D()) <= range * range;
        }
开发者ID:JelloBeans,项目名称:SAC,代码行数:15,代码来源:Utility.cs


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