本文整理汇总了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;
}
示例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);
}
示例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);
}
}
}
示例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;
}
示例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());
}
}
}
}
示例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;
}
示例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);
}
}
}