本文整理汇总了C#中Obj_AI_Base.CountEnemeis方法的典型用法代码示例。如果您正苦于以下问题:C# Obj_AI_Base.CountEnemeis方法的具体用法?C# Obj_AI_Base.CountEnemeis怎么用?C# Obj_AI_Base.CountEnemeis使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Obj_AI_Base
的用法示例。
在下文中一共展示了Obj_AI_Base.CountEnemeis方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Rlogic
public static void Rlogic(Obj_AI_Base target)
{
if (target == null)
{
return;
}
var Combomode = Common.orbmode(Orbwalker.ActiveModes.Combo);
var hits = ComboMenu.slider("Rhit");
if (Combomode)
{
if (ComboMenu.checkbox("RAoe"))
{
var AoeHit = target.CountEnemeis(400) >= hits;
var bestaoe = EntityManager.Heroes.Enemies.OrderByDescending(e => e.CountEnemeis(400)).FirstOrDefault(e => e.IsKillable(R.Range) && e.IsKillable() && e.CountEnemeis(400) >= hits);
if (AoeHit)
{
R.Cast(target);
}
else
{
if (bestaoe != null)
{
R.Cast(bestaoe);
}
}
}
if (ComboMenu.checkbox("RFinisher"))
{
var pred = R.GetDamage(target) >= Prediction.Health.GetPrediction(target, Q.CastDelay);
var health = R.GetDamage(target) >= target.TotalShieldHealth();
if (Q.GetDamage(target) >= Prediction.Health.GetPrediction(target, Q.CastDelay))
{
return;
}
if (W.GetDamage(target) >= Prediction.Health.GetPrediction(target, W.CastDelay))
{
return;
}
if (E.GetDamage(target) >= Prediction.Health.GetPrediction(target, E.CastDelay))
{
return;
}
if (pred || health)
{
R.Cast(target);
}
}
}
}
示例2: Qlogic
public static void Qlogic(Menu m, Obj_AI_Base target, bool Draw = false)
{
var pos = new Vector3();
var danger = target.CountEnemeis(600) > 3;
switch (m.combobox("Qmode"))
{
case 0:
{
if (danger)
{
var ally = EntityManager.Heroes.Allies.OrderByDescending(a => a.CountAllies(750)).FirstOrDefault(a => a.IsKillable(1000) && !a.IsMe);
if (ally != null)
{
pos = ally.ServerPosition;
}
}
if (target.IsKillable(user.GetAutoAttackRange() - 100))
{
pos = user.ServerPosition.Extend(target.ServerPosition, -400).To3D();
}
if (!target.IsKillable(user.GetAutoAttackRange()))
{
pos = Q.GetPrediction(target).CastPosition;
}
}
break;
case 1:
{
if (target.IsKillable(user.GetAutoAttackRange() - 100))
{
pos = user.ServerPosition.Extend(target.ServerPosition, -400).To3D();
}
}
break;
case 2:
{
if (!target.IsKillable(user.GetAutoAttackRange()))
{
pos = Q.GetPrediction(target).CastPosition;
}
}
break;
case 3:
{
pos = Game.CursorPos;
}
break;
}
if (!Draw)
{
Q.Cast(pos);
}
if (Draw)
{
Circle.Draw(SharpDX.Color.White, 100, pos);
}
}