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


C# AttackableUnit.LSIsValidTarget方法代码示例

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


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

示例1: GetRealAutoAttackRange

 /// <summary>
 ///     Returns the auto-attack range of local player with respect to the target.
 /// </summary>
 /// <param name="target">The target.</param>
 /// <returns>System.Single.</returns>
 public static float GetRealAutoAttackRange(AttackableUnit target)
 {
     var result = ObjectManager.Player.GetAutoAttackRange(target);
     if (target.LSIsValidTarget())
     {
         return result;
     }
     return result;
 }
开发者ID:CONANLXF,项目名称:Berb.Common,代码行数:14,代码来源:OtherOrb.cs

示例2: GetRealAutoAttackRange

 public static float GetRealAutoAttackRange(AIHeroClient attacker, AttackableUnit target)
 {
     var result = attacker.AttackRange + attacker.BoundingRadius;
     if (target.LSIsValidTarget())
     {
         return result + target.BoundingRadius;
     }
     return result;
 }
开发者ID:yashine59fr,项目名称:PortAIO,代码行数:9,代码来源:PlayerHelper.cs

示例3: InAutoAttackRange

 /// <summary>
 ///     Returns true if the target is in auto-attack range.
 /// </summary>
 /// <param name="target">The target.</param>
 /// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
 public static bool InAutoAttackRange(AttackableUnit target)
 {
     if (!target.LSIsValidTarget())
     {
         return false;
     }
     var myRange = GetRealAutoAttackRange(target);
     return
         Vector2.DistanceSquared(
             target is Obj_AI_Base ? ((Obj_AI_Base)target).ServerPosition.To2D() : target.Position.To2D(),
             Player.ServerPosition.To2D()) <= myRange * myRange;
 }
开发者ID:CONANLXF,项目名称:Berb.Common,代码行数:17,代码来源:OtherOrb.cs

示例4: Orbwalker_OnPostAttack

 private void Orbwalker_OnPostAttack(AttackableUnit target, EventArgs args)
 {
     Orbwalker.ForcedTarget = null;
     var t = target as Obj_AI_Base;
     if (Q.IsReady() && target.LSIsValidTarget() && !t.IsMinion)
     {
         this.QLogic(target);
         if (UseQStackTransferBool)
         {
             this.QLogic(target);
         }
     }
 }
开发者ID:Xelamats,项目名称:PortAIO,代码行数:13,代码来源:Kalista.cs

示例5: GetRealAutoAttackRange

        public static float GetRealAutoAttackRange(AttackableUnit target)
        {
            var result = ObjectManager.Player.AttackRange + ObjectManager.Player.BoundingRadius;
            if (target.LSIsValidTarget())
            {
                var aiBase = target as Obj_AI_Base;
                if (aiBase != null && ObjectManager.Player.ChampionName == "Caitlyn")
                {
                    if (aiBase.HasBuff("caitlynyordletrapinternal"))
                    {
                        result += 650;
                    }
                }

                return result + target.BoundingRadius;
            }

            return result;
        }
开发者ID:yashine59fr,项目名称:PortAIO,代码行数:19,代码来源:Program.cs

示例6: CanOrbwalkTarget

 /// <summary>
 /// Checks if player can orbwalk given target in custom range
 /// </summary>
 /// <param name="target">Target</param>
 /// <param name="range">Custom range</param>
 /// <returns>true if can orbwalk target</returns>
 public bool CanOrbwalkTarget(AttackableUnit target, float range)
 {
     if (target.LSIsValidTarget())
     {
         if (target.Type == GameObjectType.AIHeroClient)
         {
             AIHeroClient hero = target as AIHeroClient;
             return ObjectManager.Player.LSDistance(hero.ServerPosition) - hero.BoundingRadius - hero.GetScalingRange() + 10 < range + ObjectManager.Player.BoundingRadius + ObjectManager.Player.GetScalingRange();
         }
         else
             return ObjectManager.Player.LSDistance(target.Position) - target.BoundingRadius + 20 < range + ObjectManager.Player.BoundingRadius + ObjectManager.Player.GetScalingRange();
     }
     return false;
 }
开发者ID:yashine59fr,项目名称:PortAIO-1,代码行数:20,代码来源:Orbwalker.cs

示例7: Magnet

 /// <summary>
 /// Magnets the hero to given target
 /// </summary>
 /// <param name="target">The target.</param>
 private void Magnet(AttackableUnit target)
 {
     if (!m_attackInProgress && !CanOrbwalkTarget(target))
     {
         if (ObjectManager.Player.AttackRange <= m_Configuration.StickRange)
         {
             if (target.LSIsValidTarget(m_Configuration.StickRange))
             {
                 /*expermential*/
                 OrbwalkingPoint = target.Position.LSExtend(ObjectManager.Player.ServerPosition, -(m_rnd.NextFloat(0.6f, 1.01f) + 0.2f) * 400);
                 /*expermential*/
             }
             else
                 OrbwalkingPoint = Vector3.Zero;
         }
         else
             OrbwalkingPoint = Vector3.Zero;
     }
     else
         OrbwalkingPoint = Vector3.Zero;
 }
开发者ID:yashine59fr,项目名称:PortAIO-1,代码行数:25,代码来源:Orbwalker.cs

示例8: FireAfterAttack

 /// <summary>
 ///     Fires the after attack event.
 /// </summary>
 /// <param name="unit">The unit.</param>
 /// <param name="target">The target.</param>
 private static void FireAfterAttack(AttackableUnit unit, AttackableUnit target)
 {
     if (AfterAttack != null && target.LSIsValidTarget())
     {
         AfterAttack(unit, target);
     }
 }
开发者ID:yashine59fr,项目名称:PortAIO,代码行数:12,代码来源:Orbwalking.cs

示例9: OrbwalkingOnAfterAttack

        private static void OrbwalkingOnAfterAttack(AttackableUnit target, EventArgs args)
        {
            if (!(target is AIHeroClient))
            {
                return;
            }

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

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

示例10: CanUse

 private static bool CanUse(Spell spell, AttackableUnit target)
 {
     return spell.IsReady() && Player.Mana >= spell.ManaCost && target.LSIsValidTarget(spell.Range);
 }
开发者ID:yashine59fr,项目名称:PortAIO-1,代码行数:4,代码来源:Taliyah.cs

示例11: IsValidUnit

 /// <summary>
 ///     Determines whether the unit is valid.
 /// </summary>
 /// <param name="unit">
 ///     The unit.
 /// </param>
 /// <param name="range">
 ///     The range.
 /// </param>
 /// <returns>
 ///     The <see cref="bool" />.
 /// </returns>
 private static bool IsValidUnit(AttackableUnit unit, float range = 0f)
 {
     return unit.LSIsValidTarget(range > 0 ? range : unit.GetRealAutoAttackRange());
 }
开发者ID:CONANLXF,项目名称:Berb.Common,代码行数:16,代码来源:Orbwalking.cs

示例12: 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.LSIsValidTarget())
                return false;

            Obj_AI_Base unit = CorrectUnit(_unit);
            float range = GetRealAARange(target, _unit);
            return Vector2.DistanceSquared(target.Position.LSTo2D(), unit.ServerPosition.LSTo2D()) <= range * range;
        }
开发者ID:yashine59fr,项目名称:PortAIO-1,代码行数:15,代码来源:Extensions.cs

示例13: InWRange

 public static bool InWRange(AttackableUnit t) => t != null && t.LSIsValidTarget(WRange);
开发者ID:Xelamats,项目名称:PortAIO,代码行数:1,代码来源:Logic.cs

示例14: AfterAttack

        private static void AfterAttack(AttackableUnit target, EventArgs args)
        {
            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
            {
                if (getCheckBoxItem(comboMenu, "useE") && e.IsReady() && target is AIHeroClient && target.LSIsValidTarget(e.Range))
                {
                    e.Cast();
                }
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear))
            {
                if (getCheckBoxItem(clearMenu, "useEj") && e.IsReady() && target is Obj_AI_Minion && target.LSIsValidTarget(e.Range))
                {
                    e.Cast();
                }
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) ||
                Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
            {
                if ((getCheckBoxItem(miscMenu, "titanicC") || getCheckBoxItem(miscMenu, "ravenousC") ||
                     getCheckBoxItem(miscMenu, "tiamatC")) && !e.IsReady() && target is AIHeroClient &&
                    target.LSIsValidTarget(e.Range) && CommonUtilities.CheckItem())
                {
                    CommonUtilities.UseItem();
                }
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear))
            {
                if ((getCheckBoxItem(miscMenu, "titanicF") || getCheckBoxItem(miscMenu, "ravenousF") ||
                     getCheckBoxItem(miscMenu, "tiamatF")) && !e.IsReady() && target is Obj_AI_Minion &&
                    target.LSIsValidTarget(e.Range) && CommonUtilities.CheckItem())
                {
                    CommonUtilities.UseItem();
                }
            }
        }
开发者ID:yashine59fr,项目名称:PortAIO,代码行数:39,代码来源:Program.cs

示例15: ExecuteCastItems

        private static void ExecuteCastItems(AttackableUnit t)
        {
            foreach (var item in Common.CommonItems.ItemDb)
            {
                if (item.Value.ItemType == Common.CommonItems.EnumItemType.AoE
                    && item.Value.TargetingType == Common.CommonItems.EnumItemTargettingType.EnemyHero)
                {
                    if (t is AIHeroClient && t.LSIsValidTarget(item.Value.Item.Range) && item.Value.Item.IsReady())
                        item.Value.Item.Cast();
                }

                if (item.Value.ItemType == Common.CommonItems.EnumItemType.Targeted
                    && item.Value.TargetingType == Common.CommonItems.EnumItemTargettingType.EnemyHero)
                {
                    if (t.LSIsValidTarget(item.Value.Item.Range) && item.Value.Item.IsReady())
                        item.Value.Item.Cast((AIHeroClient)t);
                }
            }
        }
开发者ID:yashine59fr,项目名称:PortAIO,代码行数:19,代码来源:ModeCombo.cs


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