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


C# Vector3.CountAlliesInRange方法代码示例

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


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

示例1: GetAvgDistanceFromAllyTeam

        public static float GetAvgDistanceFromAllyTeam(Vector3 from, float MaxRange = 1200f)
        {
            var numberOfAllies = from.CountAlliesInRange(MaxRange);
            if (numberOfAllies != 0)
            {
                var allies = HeroManager.Allies.Where(ally => ally.IsValidTarget(MaxRange, false, from) && !ally.IsMe).ToList();
                var totalDistance = allies.Sum(ally => ally.Distance(ObjectManager.Player.ServerPosition));

                return totalDistance / numberOfAllies;
            }
            return -1;
        }
开发者ID:DZ191,项目名称:LeagueSharp,代码行数:12,代码来源:PositioningHelper.cs

示例2: 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

示例3: kill

 private void kill(Positions positions, Vector3 pos)
 {
     if (R.IsReady() && pos.Distance(positions.Player.Position) < 1200 && pos.CountAlliesInRange(1800) < 1)
     {
         if (checkdmg(positions.Player) && UltTime(pos) < positions.RecallData.GetRecallTime() &&
             !isColliding(pos) && !CheckShieldTower(pos))
         {
             R.Cast(pos);
         }
     }
 }
开发者ID:koolkaracter,项目名称:LeagueSharp,代码行数:11,代码来源:LastPositions.cs

示例4: CheckObjective

 private static bool CheckObjective(Vector3 pos)
 {
     if ((pos.CountEnemiesInRange(800) > 0 || pos.CountAlliesInRange(800) > 0) && !CheckForRetreat(null, pos))
     {
         var obj = Helpers.GetNearest(pos);
         if (obj != null && obj.Health < obj.MaxHealth - 300)
         {
             if (player.Distance(pos) > Jungle.smiteRange)
             {
                 _GameInfo.MoveTo = pos;
                 return true;
             }
         }
     }
     if ((Jungle.SmiteReady() || (player.Level >= 14 && player.HealthPercent > 80)) && player.Level >= 9 &&
         player.Distance(Camps.Dragon.Position) < GameInfo.ChampionRange)
     {
         var drake = Helpers.GetNearest(player.Position, GameInfo.ChampionRange);
         if (drake != null && drake.Name.Contains("Dragon"))
         {
             _GameInfo.CurrentMonster = 13;
             _GameInfo.MoveTo = drake.Position;
             return true;
         }
     }
     return false;
 }
开发者ID:chienhao10,项目名称:LeagueSharp.BOT,代码行数:27,代码来源:Program.cs

示例5: kill

 private void kill(Positions positions, Vector3 pos)
 {
     if (R.IsReady() && pos.Distance(positions.Player.Position) < 1200 &&
         pos.CountAlliesInRange(configMenu.Item("Alliesrange").GetValue<Slider>().Value) < 1)
     {
         if (checkdmg(positions.Player, pos) && UltTime(pos) < positions.RecallData.GetRecallTime() &&
             !isColliding(pos))
         {
             if (player.ChampionName == "Xerath")
             {
                 xerathUlt(positions, pos);
             }
             R.Cast(pos);
             if (player.ChampionName == "Draven" && configMenu.Item("CallBack").GetValue<bool>())
             {
                 Utility.DelayAction.Add((int) (UltTime(pos)-300), () => R.Cast());
             }
         }
     }
 }
开发者ID:uio25371555,项目名称:LeagueSharp-4,代码行数:20,代码来源:LastPositions.cs

示例6: 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

示例7: kill

 private void kill(Positions positions, Vector3 pos)
 {
     if (R.IsReady() && pos.Distance(positions.Player.Position) < 1200 &&
         pos.CountAlliesInRange(configMenu.Item("Alliesrange").GetValue<Slider>().Value) < 1)
     {
         if (checkdmg(positions.Player, pos) && UltTime(pos) < positions.RecallData.GetRecallTime() &&
             !isColliding(pos))
         {
             if (player.ChampionName == "Xerath")
             {
                 xerathUlt(positions, pos);
             }
             R.Cast(pos);
         }
     }
 }
开发者ID:q199230217,项目名称:LeagueSharp,代码行数:16,代码来源:LastPositions.cs


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