本文整理汇总了C#中Obj_AI_Base.UnderTurret方法的典型用法代码示例。如果您正苦于以下问题:C# Obj_AI_Base.UnderTurret方法的具体用法?C# Obj_AI_Base.UnderTurret怎么用?C# Obj_AI_Base.UnderTurret使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Obj_AI_Base
的用法示例。
在下文中一共展示了Obj_AI_Base.UnderTurret方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnProcessSpellCast
private static void OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
{
if (sender == null || !sender.IsValid || args == null)
{
return;
}
var target = args.Target;
if (target == null || !target.IsValid)
{
return;
}
if (sender.IsMe && sender.UnderTurret(true) && target.IsEnemy)
{
}
if (sender is Obj_AI_Turret && target.IsMe)
{
}
if (sender is Obj_AI_Minion && target.IsMe)
{
var orbwalkingPos = new Vector2
{
X = ObjectManager.Player.Position.X + ObjConstants.DefensiveAdditioner,
Y = ObjectManager.Player.Position.Y + ObjConstants.DefensiveAdditioner
};
ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, orbwalkingPos.To3D());
}
}
示例2: OnProcessSpellCast
private static void OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
{
if (sender.IsMe && sender.UnderTurret(true) && args.Target.IsEnemy && args.Target.Type == GameObjectType.obj_AI_Hero)
{
_overrideAttackUnitAction = true;
}
}
示例3: TargetSkill
public static void TargetSkill(Obj_AI_Base target, Spell spell, bool packet = false, bool towerCheck = false)
{
if (!spell.IsReady())
{
return;
}
if (target == null || towerCheck && target.UnderTurret(true))
{
return;
}
spell.Cast(target, packet);
}
示例4: SkillShot
public static void SkillShot(Obj_AI_Base target,
Spell spell,
HitChance hitChance,
bool aoe = false,
bool towerCheck = false)
{
if (!spell.IsReady())
{
return;
}
if (target == null || towerCheck && target.UnderTurret(true))
{
return;
}
spell.UpdateSourcePosition();
var prediction = spell.GetPrediction(target, aoe);
if (prediction.Hitchance >= hitChance)
{
spell.Cast(prediction.CastPosition);
}
}
示例5: CastE
private static bool CastE(Obj_AI_Base target, bool skipCheck = false)
{
return (skipCheck || !getCheckBoxItem(eMenu, "ETurret") || !target.UnderTurret(true)) &&
E.CastOnUnit(target);
}
示例6: CastW
public static bool CastW(Obj_AI_Base target)
{
if (!W.IsReady() || !target.IsValidTarget(W.Range) ||
(Menu.Item("WTurret").IsActive() && target.UnderTurret(true)))
{
return false;
}
return W.Cast(target).IsCasted();
}
示例7: CheckForRetreat
private static bool CheckForRetreat(Obj_AI_Base enemy, Vector3 pos)
{
if (_GameInfo.GameState == State.Jungling)
{
return false;
}
if (enemy != null && !enemy.UnderTurret(true) && player.Distance(enemy) < 350 && !_GameInfo.AttackedByTurret)
{
return false;
}
var indanger = ((Helpers.GetHealth(true, pos) +
((player.Distance(pos) < GameInfo.ChampionRange) ? 0 : player.Health)) * 1.3f <
Helpers.GetHealth(false, pos) && pos.CountEnemiesInRange(GameInfo.ChampionRange) > 1 &&
Helpers.AlliesThere(pos, 500) == 0) ||
player.HealthPercent < menu.Item("HealtToBack").GetValue<Slider>().Value;
if (indanger || _GameInfo.AttackedByTurret)
{
if (((enemy != null && Helpers.AlliesThere(pos, 600) > 0) && player.HealthPercent > 25))
{
return false;
}
if (_GameInfo.AttackedByTurret)
{
if ((enemy != null &&
(enemy.Health > player.GetAutoAttackDamage(enemy, true) * 2 ||
enemy.Distance(player) > Orbwalking.GetRealAutoAttackRange(enemy) + 20) || enemy == null))
{
return true;
}
}
if (indanger)
{
return true;
}
}
return false;
}
示例8: Obj_AI_Base_OnIssueOrder
private static void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args)
{
if (sender == null || !sender.IsValid || !sender.IsMe)
{
return;
}
int mvmtDelay = Randoms.Rand.Next(200, 770);
if (args.Order == GameObjectOrder.MoveTo)
{
if (ObjectManager.Player.HasBuff("SionR"))
return;
if (Environment.TickCount - LastMove < mvmtDelay)
{
args.Process = false;
// LastMove = Environment.TickCount;
return;
}
LastMove = Environment.TickCount;
}
if (args.Target == null)
{
return;
}
if (args.Target.IsEnemy && args.Target is Obj_AI_Hero
&& sender.UnderTurret(true)
&& (args.Order == GameObjectOrder.AutoAttack || args.Order == GameObjectOrder.AttackUnit))
{
args.Process = false;
}
}
示例9: CastE
private static bool CastE(Obj_AI_Base target, bool skipCheck = false)
{
return (skipCheck || !Menu.Item("ETurret").IsActive() || !target.UnderTurret(true)) && E.CastOnUnit(target);
}