本文整理汇总了C#中AIHeroClient.ECanKill方法的典型用法代码示例。如果您正苦于以下问题:C# AIHeroClient.ECanKill方法的具体用法?C# AIHeroClient.ECanKill怎么用?C# AIHeroClient.ECanKill使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AIHeroClient
的用法示例。
在下文中一共展示了AIHeroClient.ECanKill方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CastENew
internal void CastENew(AIHeroClient target)
{
if (!SpellSlot.E.IsReady() || Yasuo.LSIsDashing() || InDash)
{
return;
}
var minionsinrange = ObjectManager.Get<Obj_AI_Minion>().Any(x => x.IsDashable());
if (target == null || !target.IsInRange(minionsinrange ? Spells[E].Range * 2 : Spells[E].Range))
{
target = TargetSelector.GetTarget(minionsinrange ? Spells[E].Range * 2 : Spells[E].Range,
DamageType.Physical);
}
if (target != null && TowerCheck(target, true))
{
var dist = Yasuo.LSDistance(target);
var pctOutOfRange = dist / Yasuo.AttackRange * 100;
if (pctOutOfRange > 0.8f)
{
if (target.IsDashable())
{
if (target.ECanKill())
{
return;
}
if (TornadoReady && target.IsInRange(Spells[E].Range) && targInKnockupRadius(target))
{
Spells[E].CastOnUnit(target);
}
//Stay in range
else if (pctOutOfRange > 0.8f)
{
var bestminion = ObjectManager.Get<Obj_AI_Base>()
.Where(x =>
x.IsDashable()
&& GetDashPos(x).IsCloser(target) && TowerCheck(x, true))
.MinOrDefault(x => GetDashPos(x).LSDistance(target));
var shouldETarget = bestminion == null || GetDashPos(target).Distance(target) <
GetDashPos(bestminion).LSDistance(target);
if (shouldETarget && GetDashPos(target).IsCloser(target))
{
Spells[E].CastOnUnit(target);
}
else if (bestminion != null)
{
Spells[E].CastOnUnit(bestminion);
}
}
}
else
{
var minion = ObjectManager.Get<Obj_AI_Minion>()
.Where(x => x.IsDashable() && x.IsCloser(target) && TowerCheck(x, true))
.MinOrDefault(x => GetDashPos(x).LSDistance(target));
if (minion != null)
{
Spells[E].CastOnUnit(minion);
}
}
}
}
}