本文整理汇总了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);
}
示例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));
}
示例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;
}
示例4: isUnderEnemyTurret
bool isUnderEnemyTurret(Vector3 Position)
{
return Position.UnderTurret(true);
}
示例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;
}
示例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;
}
示例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;
}
示例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)
{
//.........这里部分代码省略.........
示例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;
}
示例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;
}
示例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;
}
示例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));
}
示例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;
}
示例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;
}
示例15: DashCheck
private bool DashCheck(Vector3 dash)
{
if ((!dash.UnderTurret(true) || Program.Combo))
return true;
else
return false;
}