本文整理汇总了C#中AIHeroClient.ELDistance方法的典型用法代码示例。如果您正苦于以下问题:C# AIHeroClient.ELDistance方法的具体用法?C# AIHeroClient.ELDistance怎么用?C# AIHeroClient.ELDistance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AIHeroClient
的用法示例。
在下文中一共展示了AIHeroClient.ELDistance方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InsecCombo
private static void InsecCombo(AIHeroClient target)
{
try
{
if (target != null && target.IsVisible)
{
if (Player.ELDistance(GetInsecPos(target)) < 200)
{
insecComboStep = InsecComboStepSelect.Pressr;
}
else if (insecComboStep == InsecComboStepSelect.None
&& GetInsecPos(target).ELDistance(Player.Position) < 600)
{
insecComboStep = InsecComboStepSelect.Wgapclose;
}
else if (insecComboStep == InsecComboStepSelect.None
&& target.ELDistance(Player) < spells[Spells.Q].Range)
{
insecComboStep = InsecComboStepSelect.Qgapclose;
}
switch (insecComboStep)
{
case InsecComboStepSelect.Qgapclose:
if (QState)
{
var pred1 = spells[Spells.Q].GetPrediction(target);
if (pred1.Hitchance >= HitChance.High)
{
if (pred1.CollisionObjects.Count == 0)
{
if (spells[Spells.Q].Cast(pred1.CastPosition))
{
return;
}
}
else
{
CastQ(target);
}
}
if (!getCheckBoxItem(InitMenu.insecMenu, "checkOthers1"))
{
return;
}
var insecObjects =
HeroManager.Enemies.Where(
x => x.LSIsValidTarget(spells[Spells.Q].Range) && x.ELDistance(target) < 550f)
.Concat(MinionManager.GetMinions(Player.ServerPosition, spells[Spells.Q].Range))
.Where(
m =>
m.LSIsValidTarget(spells[Spells.Q].Range)
&& spells[Spells.Q].GetDamage(m) < m.Health + 15
&& m.ELDistance(target) < 400f)
.ToList();
if (insecObjects.Count > 0)
{
foreach (var insectObject in
insecObjects.Select(i => spells[Spells.Q].GetPrediction(i))
.Where(i => i.Hitchance >= HitChance.High)
.OrderByDescending(i => i.Hitchance))
{
spells[Spells.Q].Cast(insectObject.CastPosition);
break;
}
}
else
{
return;
}
}
if (!(target.HasQBuff()) && QState)
{
CastQ(target);
}
else if (target.HasQBuff())
{
spells[Spells.Q].Cast();
insecComboStep = InsecComboStepSelect.Wgapclose;
}
else
{
if (spells[Spells.Q].Instance.Name.Equals(
"blindmonkqtwo",
StringComparison.InvariantCultureIgnoreCase)
&& ReturnQBuff()?.ELDistance(target) <= 600)
{
spells[Spells.Q].Cast();
}
}
break;
case InsecComboStepSelect.Wgapclose:
if (Player.ELDistance(target) < WardRange)
{
//.........这里部分代码省略.........
示例2: GetInsecPos
public static Vector3 GetInsecPos(AIHeroClient target)
{
try
{
var jumpRange = 265;
if (ClicksecEnabled && getCheckBoxItem(InitMenu.insecMenu, "clickInsec"))
{
InsecLinePos = Drawing.WorldToScreen(InsecClickPos);
return V2E(InsecClickPos, target.Position, target.ELDistance(InsecClickPos) + jumpRange).To3D();
}
if (isNullInsecPos)
{
isNullInsecPos = false;
insecPos = Player.Position;
}
if (GetAllyHeroes(target, 2000 + getSliderItem(InitMenu.insecMenu, "bonusRangeA")).Count > 0
&& getCheckBoxItem(InitMenu.insecMenu, "ElLeeSin.Insec.Ally"))
{
var insecPosition = InterceptionPoint(GetAllyInsec(GetAllyHeroes(target, 2000 + getSliderItem(InitMenu.insecMenu, "bonusRangeA"))));
InsecLinePos = Drawing.WorldToScreen(insecPosition);
return V2E(insecPosition, target.Position, target.ELDistance(insecPosition) + jumpRange).To3D();
}
if (getCheckBoxItem(InitMenu.insecMenu, "ElLeeSin.Insec.Tower"))
{
var tower =ObjectManager.Get<Obj_AI_Turret>().Where(turret => turret.ELDistance(target) - 725 <= 950 && turret.IsAlly && turret.IsVisible && turret.Health > 0 && turret.ELDistance(target) <= 1300 && turret.ELDistance(target) > 400).MinOrDefault(i => target.ELDistance(Player));
if (tower != null)
{
InsecLinePos = Drawing.WorldToScreen(tower.Position);
return V2E(tower.Position, target.Position, target.ELDistance(tower.Position) + jumpRange).To3D();
}
}
if (getCheckBoxItem(InitMenu.insecMenu, "ElLeeSin.Insec.Original.Pos"))
{
InsecLinePos = Drawing.WorldToScreen(insecPos);
return V2E(insecPos, target.Position, target.ELDistance(insecPos) + jumpRange).To3D();
}
return new Vector3();
}
catch (Exception e)
{
Console.WriteLine("An error occurred: '{0}'", e);
}
return new Vector3();
}