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


C# Vector3.UnderTurret方法代码示例

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


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

示例1: OkToQ

        public static bool OkToQ(Vector3 position)
        {
            if (position.UnderTurret(true) && !ObjectManager.Player.UnderTurret(true))
                return false;
            var allies = position.CountAlliesInRange(ObjectManager.Player.AttackRange);
            var enemies = position.CountEnemiesInRange(ObjectManager.Player.AttackRange);
            var lhEnemies = GetLhEnemiesNearPosition(position, ObjectManager.Player.AttackRange).Count();

            if (enemies == 1) //It's a 1v1, safe to assume I can E
            {
                return true;
            }

            //Adding 1 for the Player
            return (allies + 1 > enemies - lhEnemies);
        }
开发者ID:GodLS,项目名称:LSharpWIP,代码行数:16,代码来源:Helpers.cs

示例2: IsDangerousPosition

 private bool IsDangerousPosition(Vector3 pos)
 {
     return ValidTargets.Any(e => e.IsMelee && e.Distance(pos) < 375) ||
            (pos.UnderTurret(true) && !EloBuddy.ObjectManager.Player.ServerPosition.UnderTurret(true));
 }
开发者ID:yashine59fr,项目名称:PortAIO,代码行数:5,代码来源:Vayne.cs

示例3: IsGoodPosition

        public bool IsGoodPosition(Vector3 dashPos)
        {
            if (Config.Item("WallCheck", true).GetValue<bool>())
            {
                float segment = DashSpell.Range / 5;
                for (int i = 1; i <= 5; i++)
                {
                    if (Player.Position.Extend(dashPos, i * segment).IsWall())
                        return false;
                }
            }

            if (Config.Item("TurretCheck", true).GetValue<bool>())
            {
                if(dashPos.UnderTurret(true))
                    return false;
            }

            var enemyCheck = Config.Item("EnemyCheck", true).GetValue<Slider>().Value;
            var enemyCountDashPos = dashPos.CountEnemiesInRange(600);

            if (enemyCheck > enemyCountDashPos)
                return true;

            var enemyCountPlayer = Player.CountEnemiesInRange(400);

            if(enemyCountDashPos <= enemyCountPlayer)
                return true;

            return false;
        }
开发者ID:superjo1508,项目名称:LeagueRepo,代码行数:31,代码来源:OKTWdash.cs

示例4: isUnderEnemyTurret

 bool isUnderEnemyTurret(Vector3 Position)
 {
     return Position.UnderTurret(true);
 }
开发者ID:LSharpAura,项目名称:LeagueSharp,代码行数:4,代码来源:Vayne.cs

示例5: CheckCondemn

        /// <summary>
        ///     Checks the Condemn
        /// </summary>
        /// <param name="fromPosition">
        ///     From Position
        /// </param>
        /// <param name="target">
        ///     The target
        /// </param>
        /// <returns>
        ///     The <see cref="bool"/>.
        /// </returns>
        private bool CheckCondemn(Vector3 fromPosition, out Obj_AI_Hero target)
        {
            if (fromPosition.UnderTurret(true) || !this.spells[SpellSlot.E].IsReady())
            {
                target = null;
                return false;
            }

            if (
                !HeroManager.Enemies.Any(
                    h =>
                        h.IsValidTarget(this.spells[SpellSlot.E].Range) && !h.HasBuffOfType(BuffType.SpellShield) &&
                        !h.HasBuffOfType(BuffType.SpellImmunity)))
            {
                target = null;
                return false;
            }

            foreach (var unit in
                HeroManager.Enemies.Where(
                    h =>
                    h.IsValidTarget(this.spells[SpellSlot.E].Range) && !h.HasBuffOfType(BuffType.SpellShield)
                    && !h.HasBuffOfType(BuffType.SpellImmunity)
                    && !this.GetItemValue<bool>("com.iseries.vayne.noe." + h.ChampionName.ToLowerInvariant())))
            {
                const int PushDistance = 400;
                var targetPosition = unit.ServerPosition;
                var endPosition = targetPosition.Extend(ObjectManager.Player.ServerPosition, -PushDistance);
                for (var i = 0; i < PushDistance; i += (int)unit.BoundingRadius)
                {
                    var extendedPosition = targetPosition.Extend(ObjectManager.Player.ServerPosition, -i);
                    if (extendedPosition.IsWall() || endPosition.IsWall())
                    {
                        target = unit;
                        return true;
                    }
                }
            }

            target = null;
            return false;
        }
开发者ID:firas500,项目名称:LSharpDZiJava,代码行数:54,代码来源:Vayne.cs

示例6: IsSafe

        public static Vector3 IsSafe(Obj_AI_Hero target, Vector3 vec, bool checkTarget = true)
        {
            if (DontSafeCheck)
                return vec;

            if (checkTarget)
            {
                if (target.ServerPosition.To2D().Distance(vec) <= target.AttackRange)
                {
                    if (vec.CountEnemiesInRange(1000) > 1)
                        return Vector3.Zero;
                    else if (target.ServerPosition.To2D().Distance(vec) <= target.AttackRange / 2f)
                        return SCommon.Maths.Geometry.Deviation(ObjectManager.Player.ServerPosition.To2D(), target.ServerPosition.To2D(), 60).To3D();
                }

                if (((DontQIntoEnemies || target.IsMelee) && HeroManager.Enemies.Any(p => p.ServerPosition.To2D().Distance(vec) <= p.AttackRange + ObjectManager.Player.BoundingRadius + (p.IsMelee ? 100 : 0))) || vec.UnderTurret(true))
                    return Vector3.Zero;
            }
            if (HeroManager.Enemies.Any(p => p.NetworkId != target.NetworkId && p.ServerPosition.To2D().Distance(vec) <= p.AttackRange + (p.IsMelee ? 50 : 0)) || vec.UnderTurret(true))
                return Vector3.Zero;

            return vec;
        }
开发者ID:JelloBeans,项目名称:SAC,代码行数:23,代码来源:Tumble.cs

示例7: IsSafe

        /// <summary>
        /// Checks if a position is safe
        /// </summary>
        /// <param name="position">
        /// The Position
        /// </param>
        /// <returns>
        /// The <see cref="bool"/>.
        /// </returns>
        private bool IsSafe(Vector3 position)
        {
            if (position.UnderTurret(true) && !ObjectManager.Player.UnderTurret(true))
            {
                return false;
            }

            var allies = position.CountAlliesInRange(ObjectManager.Player.AttackRange);
            var enemies = position.CountEnemiesInRange(ObjectManager.Player.AttackRange);
            var lhEnemies = GetLhEnemiesNearPosition(position, ObjectManager.Player.AttackRange).Count();

            if (enemies == 1)
            {
                // It's a 1v1, safe to assume I can E
                return true;
            }

            // Adding 1 for the Player
            return allies + 1 > enemies - lhEnemies;
        }
开发者ID:firas500,项目名称:LSharpDZiJava,代码行数:29,代码来源:Graves.cs

示例8: CondemnCheck

        /// <summary>
        /// The E logic checker method.
        /// </summary>
        /// <param name="fromPosition">The start position</param>
        /// <param name="tg">The target which can be condemned.</param>
        /// <returns>Whether the target is condemnable or not.</returns>
        private static bool CondemnCheck(Vector3 fromPosition, out Obj_AI_Hero tg)
        {
            if (Environment.TickCount - _lastCondemnCheck < 150)
            {
                tg = null;
                return false;
            }
            _lastCondemnCheck = Environment.TickCount;

            if ((fromPosition.UnderTurret(true) && MenuHelper.isMenuEnabled("dz191.vhr.misc.condemn.noeturret"))|| !_spells[SpellSlot.E].IsReady())
            {
                tg = null;
                return false;
            }
            if (
                !HeroManager.Enemies.Any(
                    h =>
                        h.IsValidTarget(_spells[SpellSlot.E].Range) && !h.HasBuffOfType(BuffType.SpellShield) &&
                        !h.HasBuffOfType(BuffType.SpellImmunity)))
            {
                tg = null;
                return false;
            }
            switch (Menu.Item("dz191.vhr.misc.condemn.condemnmethod").GetValue<StringList>().SelectedIndex)
            {
                case 0:
                    //VHReborn Condemn Code
                    foreach (var target in HeroManager.Enemies.Where(h => h.IsValidTarget(_spells[SpellSlot.E].Range) && !h.HasBuffOfType(BuffType.SpellShield) && !h.HasBuffOfType(BuffType.SpellImmunity)))
                    {
                        var pushDistance = MenuHelper.getSliderValue("dz191.vhr.misc.condemn.pushdistance");
                        var targetPosition = target.ServerPosition;
                        var finalPosition = targetPosition.Extend(fromPosition, -pushDistance);
                        var numberOfChecks = (float)Math.Ceiling(pushDistance / 30f);

                        if (MenuHelper.isMenuEnabled("dz191.vhr.misc.condemn.onlystuncurrent") &&
                                    !target.Equals(Orbwalker.GetTarget()))
                        {
                            continue;
                        }

                        for (var i = 1; i <= 30; i++)
                        {
                            var v3 = (targetPosition - fromPosition).Normalized();
                            var extendedPosition = targetPosition + v3 * (numberOfChecks * i);
                            //var underTurret = MenuHelper.isMenuEnabled("dz191.vhr.misc.condemn.condemnturret") && (Helpers.UnderAllyTurret(finalPosition) || Helpers.IsFountain(finalPosition));
                            var j4Flag = MenuHelper.isMenuEnabled("dz191.vhr.misc.condemn.condemnflag") && (Helpers.IsJ4FlagThere(extendedPosition, target));
                            if ((extendedPosition.IsWall() || j4Flag) && (target.Path.Count() < 2) && !target.IsDashing())
                            {

                                if (target.Health + 10 <=
                                    ObjectManager.Player.GetAutoAttackDamage(target) *
                                    MenuHelper.getSliderValue("dz191.vhr.misc.condemn.noeaa"))
                                {
                                    tg = null;
                                    return false;
                                }

                                if (extendedPosition.UnderTurret(true))
                                {
                                    tg = null;
                                    return false;
                                }

                                if (MenuHelper.isMenuEnabled("dz191.vhr.misc.condemn.trinketbush") &&
                                    NavMesh.IsWallOfGrass(extendedPosition,25) && trinketSpell != null)
                                {
                                    var wardPosition = ObjectManager.Player.ServerPosition.Extend(
                                        extendedPosition,
                                        ObjectManager.Player.ServerPosition.Distance(extendedPosition) - 25f);
                                    LeagueSharp.Common.Utility.DelayAction.Add(250,() => trinketSpell.Cast(wardPosition));
                                }

                                CondemnNotification.Text = "Condemned " + target.ChampionName;
                                _predictedEndPosition = extendedPosition;
                                _predictedPosition = targetPosition;

                                tg = target;
                                return true;
                            }
                        }
                    }
                    break;
                case 1:
                    //Marksman/Gosu Condemn Code
                    foreach (var target in HeroManager.Enemies.Where(h => h.IsValidTarget(_spells[SpellSlot.E].Range)))
                    {
                        var pushDistance = MenuHelper.getSliderValue("dz191.vhr.misc.condemn.pushdistance");
                        var targetPosition = _spells[SpellSlot.E].GetPrediction(target).UnitPosition;
                        var finalPosition = targetPosition.Extend(fromPosition, -pushDistance);
                        var finalPosition2 = targetPosition.Extend(fromPosition, -(pushDistance/2f));
                        var underTurret = MenuHelper.isMenuEnabled("dz191.vhr.misc.condemn.condemnturret") && (finalPosition.UnderTurret(false) || Helpers.IsFountain(finalPosition));
                        var j4Flag = MenuHelper.isMenuEnabled("dz191.vhr.misc.condemn.condemnflag") && (Helpers.IsJ4FlagThere(finalPosition, target) || Helpers.IsJ4FlagThere(finalPosition2, target));
                        if (finalPosition.IsWall() || finalPosition2.IsWall() || underTurret || j4Flag)
                        {
//.........这里部分代码省略.........
开发者ID:tn0043904328,项目名称:LeagueSharp,代码行数:101,代码来源:VayneHunterReborn.cs

示例9: ShouldE

        private bool ShouldE(Vector3 vec)
        {
            var maxEnemies = menu.Item("Do_Not_E", true).GetValue<Slider>().Value;

            if (!menu.Item("E_If_UnderTurret", true).GetValue<KeyBind>().Active && vec.UnderTurret(true))
                return false;

            if (Player.HealthPercent <= menu.Item("Do_Not_E_HP", true).GetValue<Slider>().Value)
                return false;

            if (vec.CountEnemiesInRange(600) >= maxEnemies)
                return false;

            return true;
        }
开发者ID:myo,项目名称:LSharp,代码行数:15,代码来源:Ekko.cs

示例10: IsSafe

        public static Vector3 IsSafe(Obj_AI_Hero target, Vector3 vec)
        {
            if (HeroManager.Enemies.Any(p => p.NetworkId != target.NetworkId && p.ServerPosition.To2D().Distance(vec) <= p.BasicAttack.CastRange) || vec.UnderTurret(true))
                return Vector3.Zero;

            return vec;
        }
开发者ID:xQxCPMxQx,项目名称:Leaguesharp-7,代码行数:7,代码来源:Lucian.cs

示例11: IsSafe

        public static Vector3 IsSafe(Obj_AI_Hero target, Vector3 vec)
        {
            if (DontSafeCheck)
                return vec;

            if (DontQIntoEnemies && HeroManager.Enemies.Any(p => p.ServerPosition.To2D().Distance(vec) <= p.AttackRange + ObjectManager.Player.BoundingRadius + (p.IsMelee ? 100 : 0)) || vec.UnderTurret(true))
                return Vector3.Zero;

            if (HeroManager.Enemies.Any(p => p.NetworkId != target.NetworkId && p.ServerPosition.To2D().Distance(vec) <= p.AttackRange + (p.IsMelee ? 50 : 0)) || vec.UnderTurret(true))
                return Vector3.Zero;

            return vec;
        }
开发者ID:xQxCPMxQx,项目名称:Leaguesharp-7,代码行数:13,代码来源:Tumble.cs

示例12: CaitlynIsSafePosition

 bool CaitlynIsSafePosition(Vector3 position)
 {
     //If the enemies in range - the low health enemies in range are equal to zero and our Health % is >= 40% then we can go in
     return (position.CountEnemiesInRange(450f) - HeroHelper.GetLhEnemiesNearPosition(position,450f).Count == 0) && (ObjectManager.Player.HealthPercentage() >= 40) && (!position.UnderTurret(true));
 }
开发者ID:ShineSharp,项目名称:LeagueSharp-5,代码行数:5,代码来源:Caitlyn.cs

示例13: IsSafe

        public static Vector3 IsSafe(Obj_AI_Hero target, Vector3 vec)
        {
            if (target.ServerPosition.To2D().Distance(vec) <= target.AttackRange && vec.CountEnemiesInRange(1000) > 1)
                return Vector3.Zero;

            if (HeroManager.Enemies.Any(p => p.NetworkId != target.NetworkId && p.ServerPosition.To2D().Distance(vec) <= p.AttackRange) || vec.UnderTurret(true))
                return Vector3.Zero;

            return vec;
        }
开发者ID:JelloBeans,项目名称:SAC,代码行数:10,代码来源:Graves.cs

示例14: DashCheck

 private bool DashCheck(Vector3 dash)
 {
     if (
         !Player.Position.Extend(dash, Q.Range).IsWall()
         && !Player.Position.Extend(dash, Q.Range - 100).IsWall()
         && !Player.Position.Extend(dash, Q.Range - 200).IsWall()
         && !Player.Position.Extend(dash, Q.Range - 300).IsWall()
         && (!dash.UnderTurret(true) || Program.Combo))
         return true;
     else
         return false;
 }
开发者ID:47110572,项目名称:LeagueRepo,代码行数:12,代码来源:Vayne.cs

示例15: DashCheck

 private bool DashCheck(Vector3 dash)
 {
     if ((!dash.UnderTurret(true) || Program.Combo))
         return true;
     else
         return false;
 }
开发者ID:ngothaison,项目名称:HuyNKSDK,代码行数:7,代码来源:Ezreal.cs


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