本文整理汇总了C#中System.Vector3.IsUnderTurret方法的典型用法代码示例。如果您正苦于以下问题:C# Vector3.IsUnderTurret方法的具体用法?C# Vector3.IsUnderTurret怎么用?C# Vector3.IsUnderTurret使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Vector3
的用法示例。
在下文中一共展示了Vector3.IsUnderTurret方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SafeCheck
public static bool SafeCheck(Vector3 pos)
{
return SafeCheckTwo(pos)
&& SafeCheckThree(pos)
&& EntityManager.Heroes.Enemies.All(e => e.Distance(pos) > 350f)
&& (!pos.IsUnderTurret() && (!Variables.JinxTrap(pos) || !Variables.CaitTrap(pos))) || Player.Instance.IsUnderTurret() && pos.IsUnderTurret() && Player.Instance.HealthPercent > 10 && (!Variables.JinxTrap(pos) || !Variables.CaitTrap(pos));
}
示例2: SafeCheckTwo
public static bool SafeCheckTwo(Vector3 pos)
{
return (!pos.IsUnderTurret() && (!Variables.JinxTrap(pos) || !Variables.CaitTrap(pos)) || Player.Instance.IsUnderTurret()) && (!Variables.JinxTrap(pos) || !Variables.CaitTrap(pos)) &&
Variables.CloseAllies(1000).Count(a => a.HealthPercent > 10) +
EntityManager.Turrets.Allies.Count(t => t.Distance(Player.Instance) < 1000) * 2 >=
Variables.CloseEnemies(1000).Count(e => e.HealthPercent > 10) +
(Player.Instance.IsUnderTurret()
? EntityManager.Turrets.Enemies.Count(t => t.Distance(Player.Instance) < 1000) * 2
: 0);
}
示例3: GetSafeScoreTM
/// <summary>
/// OKTR turkey magic :x
/// </summary>
/// <param name="pos">Pretty self-explainatory tbh</param>
/// <returns></returns>
internal static float GetSafeScoreTM(Vector3 pos)
{
var score = 0f;
foreach (var enemy in Variables.CloseEnemies(Player.Instance.GetAutoAttackRange(), pos))
{
var enemySafeScore = 0f;
for (var i = 0; i < 4; i++)
{
var spell = SpellSlot.Unknown;
var spellSafeScore = 0f;
switch (i)
{
case 0:
spell = SpellSlot.Q;
break;
case 1:
spell = SpellSlot.W;
break;
case 2:
spell = SpellSlot.E;
break;
case 3:
spell = SpellSlot.R;
break;
}
if (enemy.Spellbook.GetSpell(spell).IsReady)
{
if (
TargetSpellDatabase.Spells.Any(
s => s.ChampionName == enemy.ChampionName && s.Spellslot == spell) &&
(TargetSpellDatabase.Spells.First(
s => s.ChampionName == enemy.ChampionName && s.Spellslot == spell).Type ==
SpellType.Skillshot
||
TargetSpellDatabase.Spells.First(
s => s.ChampionName == enemy.ChampionName && s.Spellslot == spell).Type ==
SpellType.Targeted))
{
var spellDmg = enemy.GetSpellDamage(Player.Instance, spell);
var isCC = CCDataBase.IsCC(enemy.Spellbook.GetSpell(spell).Name);
if ((spellDmg > Player.Instance.MaxHealth * 0.05 || isCC)
&& enemy.Distance(pos) < enemy.Spellbook.GetSpell(spell).SData.CastRange)
{
if (spellDmg > Player.Instance.MaxHealth * 0.05)
{
spellSafeScore += (Player.Instance.MaxHealth - spellDmg) / Player.Instance.MaxHealth *
100;
}
if (isCC)
{
spellSafeScore += Variables.CloseEnemies(1000, pos).Count * 20;
}
}
}
}
enemySafeScore += spellSafeScore;
}
if (!enemy.IsMelee)
{
if (pos.Distance(enemy) < enemy.GetAutoAttackRange())
enemySafeScore += 80;
enemySafeScore += enemy.Distance(Player.Instance) / 20;
}
if (enemy.IsMelee)
{
if (pos.Distance(enemy) < enemy.GetAutoAttackRange())
enemySafeScore += 1000;
enemySafeScore += enemy.Distance(Player.Instance) / 5;
}
if (enemy.TotalShieldMaxHealth() < Player.Instance.GetAutoAttackDamage(enemy, true))
{
enemySafeScore = 0;
}
score += enemySafeScore;
}
if (pos.IsUnderTurret()) score += 200;
return score;
}