本文整理汇总了C#中AIHeroClient.IsFacing方法的典型用法代码示例。如果您正苦于以下问题:C# AIHeroClient.IsFacing方法的具体用法?C# AIHeroClient.IsFacing怎么用?C# AIHeroClient.IsFacing使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AIHeroClient
的用法示例。
在下文中一共展示了AIHeroClient.IsFacing方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnGapcloser
private static void OnGapcloser(AIHeroClient sender, Gapcloser.GapcloserEventArgs e)
{
if (!sender.IsEnemy || !Config.Settings.AntiGapcloser.AntiGap || Player.Instance.IsRecalling()) return;
foreach (
var ally in
EntityManager.Heroes.Allies.Where(ally => sender.IsFacing(ally) && Q.IsInRange(sender.Position)))
{
if (Config.Settings.Humanizer.QCastDelayEnabled)
{
Core.DelayAction(() => { Q.Cast(Q.GetPrediction(sender).CastPosition); },
Config.Settings.Humanizer.QRndmDelay
? new Random().Next(250, Config.Settings.Humanizer.QCastDelay)
: Config.Settings.Humanizer.QCastDelay);
}
else
{
Q.Cast(Q.GetPrediction(sender).CastPosition);
}
}
}
示例2: GapCloser
private static void GapCloser(AIHeroClient sender, Gapcloser.GapcloserEventArgs e)
{
var antigap = MiscMenu["nasus.enable.antigap"].Cast<CheckBox>().CurrentValue;
if (antigap && W.IsReady() && sender.IsValidTarget(W.Range) && sender.IsFacing(Player))
W.Cast(sender);
}
示例3: OnPossibleToInterrupt
private static void OnPossibleToInterrupt(AIHeroClient unit, InterruptableSpell spell)
{
if (Player.IsDead || !getCheckBoxItem(miscMenu, "EQ") ||
!getCheckBoxItem(miscMenu, unit.ChampionName + "_" + spell.Slot) || !Q.IsReady())
{
return;
}
if (E.CanCast(unit) && Player.Mana >= Q.Instance.SData.Mana + E.Instance.SData.Mana)
{
var predE = E.GetPrediction(unit);
if (predE.Hitchance >= E.MinHitChance &&
E.Cast(
predE.UnitPosition.LSExtend(Player.ServerPosition, -E.Width/(unit.IsFacing(Player) ? 2 : 1)),
getCheckBoxItem(miscMenu, "Packet")) &&
Q.Cast(predE.UnitPosition, getCheckBoxItem(miscMenu, "Packet")))
{
return;
}
}
foreach (var flag in
Flag.Where(i => Q2.WillHit(unit, i.ServerPosition)))
{
Q.Cast(flag.ServerPosition, getCheckBoxItem(miscMenu, "Packet"));
}
}
示例4: Gapcloser_OnGapcloser
/// <summary>
/// Gapcloses whenever possible.
/// </summary>
/// <param name="sender">Enemy</param>
/// <param name="e">The Arguments</param>
static void Gapcloser_OnGapcloser(AIHeroClient sender, Gapcloser.GapcloserEventArgs e)
{
var gapR = InterruptMenu["gapR"].Cast<CheckBox>().CurrentValue;
if (gapR && sender.IsValidTarget() && sender.IsFacing(PlayerInstance))
{
var pred = R.GetPrediction(sender);
if (pred.HitChance == HitChance.High)
{
R.Cast(sender.Position);
}
}
}
示例5: OnInterruptableTarget
/// <summary>
/// Called when there is an interruptible target.
/// </summary>
/// <param name="sender">The sender.</param>
/// <param name="args">The <see cref="Interrupter2.InterruptableTargetEventArgs" /> instance containing the event data.</param>
private void OnInterruptableTarget(AIHeroClient sender, Interrupter2.InterruptableTargetEventArgs args)
{
if (!getCheckBoxItem(miscMenu, "Interrupter") || !sender.IsFacing(this.Player) || !sender.LSIsValidTarget(this.R.Range))
{
return;
}
this.R.Cast(sender);
}
示例6: ECast
private static void ECast(AIHeroClient target)
{
if (!target.IsValidTarget(E.Range) || !E.IsReady()) return;
var prediction = E.GetPrediction(target);
var pos = prediction.CastPosition;
if (pos.Distance(_Player.Position) < E.Range &&
prediction.HitChance >= HitChance.Medium)
{
if (_Player.IsFacing(target) && target.IsFacing(_Player))
{
E.Cast(pos.Extend(_Player.Position, 300).To3D());
}
else if (_Player.IsFacing(target) && !target.IsFacing(_Player))
{
E.Cast(pos.Extend(_Player.Position, 150).To3D());
}
else if (!_Player.IsFacing(target) && target.IsFacing(_Player))
{
E.Cast(pos.Extend(_Player.Position, 300).To3D());
}
}
}