本文整理汇总了C#中Obj_AI_Minion.Distance方法的典型用法代码示例。如果您正苦于以下问题:C# Obj_AI_Minion.Distance方法的具体用法?C# Obj_AI_Minion.Distance怎么用?C# Obj_AI_Minion.Distance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Obj_AI_Minion
的用法示例。
在下文中一共展示了Obj_AI_Minion.Distance方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: attackMinion
public override void attackMinion(Obj_AI_Minion minion, bool onlyAA)
{
// if (onlyAA)return;
if (JungleOrbwalker.CanAttack())
{
if (minion.Distance(player) > 400 && minion.Distance(player) <= Q.Range)
UseQ(minion);
UseW(minion);
UseE(minion);
UseR(minion);
}
JungleOrbwalker.attackMinion(minion, minion.Position.To2D().Extend(player.Position.To2D(), 100).To3D());
}
示例2: attackMinion
public override void attackMinion(Obj_AI_Minion minion, bool onlyAA)
{
if (JungleOrbwalker.CanAttack())
{
if (minion.Distance(player) < 250)
{
if (getEnchCount() == 5)
UseQ(minion);
UseW(minion);
UseE(minion);
UseR(minion);
}
}
JungleOrbwalker.attackMinion(minion, minion.Position.To2D().Extend(player.Position.To2D(), 150).To3D());
}
示例3: JungleSmite
private void JungleSmite()
{
if (!this.Menu.Item("ElSmite.Activated").GetValue<KeyBind>().Active)
{
return;
}
Minion =
(Obj_AI_Minion)
MinionManager.GetMinions(this.Player.ServerPosition, 900, MinionTypes.All, MinionTeam.Neutral)
.FirstOrDefault(
buff =>
buff.IsValidTarget() && BuffsThatActuallyMakeSenseToSmite.Contains(buff.CharData.BaseSkinName));
if (Minion == null)
{
return;
}
if (this.Menu.Item(Minion.CharData.BaseSkinName).IsActive())
{
if (Minion.Distance(this.Player.ServerPosition)
<= 500 + Minion.BoundingRadius + this.Player.BoundingRadius)
{
if (this.Menu.Item("Smite.Spell").IsActive())
{
this.ChampionSpellSmite(this.SmiteDamage(), Minion);
}
if (this.SmiteDamage() > Minion.Health)
{
this.Player.Spellbook.CastSpell(this.SmiteSpell.Slot, Minion);
}
}
}
}
示例4: countMinionsInrange
public static int countMinionsInrange(Obj_AI_Minion l, float p)
{
return ObjectManager.Get<Obj_AI_Minion>().Count(i => !i.IsDead && i.IsEnemy && l.Distance(i) < p);
}
示例5: UseQ
public override void UseQ(Obj_AI_Minion minion)
{
if (Q.IsReady())
{
if (Q.Instance.Name == "BlindMonkQOne" && BuffCount() < 2)
{
if((minion.Health / getDPS(minion) < 2.3f))
return;
PredictionOutput po = Q.GetPrediction(minion);
if (po.Hitchance >= HitChance.Low)
{
Q.Cast(po.CastPosition);
}
if (po.Hitchance == HitChance.Collision)
{
if (player.Distance(minion) > 500)
{
Q.Cast(po.CastPosition);
}
player.IssueOrder(GameObjectOrder.MoveTo, minion.Position);
}
}
else if (BuffCount() == 0 || minion.Distance(player) > 250)
Q.Cast();
}
}
示例6: UseE
public override void UseE(Obj_AI_Minion minion)
{
if (E.IsReady() && minion.Distance(player) < 300)
{
if (E.Instance.Name == "BlindMonkEOne" && BuffCount() == 0)
E.Cast();
else if (BuffCount() == 0)
E.Cast();
}
}
示例7: UseE
public override void UseE(Obj_AI_Minion minion)
{
if (E.IsReady() && minion.Health / getDPS(minion) > 2 && minion.Distance(player)<=950)
E.Cast(minion.Position);
}
示例8: UseE
public override void UseE(Obj_AI_Minion minion)
{
if (E.IsReady() && minion.Distance(player) < 340+minion.BoundingRadius && E.GetDamage(minion)*0.7f<minion.Health)
{
E.Cast();
}
}
示例9: WhyInsec
//---------------------------------------WhyInsec()-------------------------------------------------------
static void WhyInsec(Obj_AI_Base target, Vector3 cursorpos)
{
//Back distance = 300
//Why I did that
if (!WhyIDidThatAddonInsec && Orbwalker.ValidAzirSoldiers.Any(it => it.Distance(target) >= E.Width + target.BoundingRadius && it.Distance(target) <= (R.Width/2) - 50))
{
if (!WhyIDidThatAddonInsec)
WhyIDidThatAddonInsec = true;
Core.DelayAction(() => WhyIDidThatAddonInsec = false, 3000);
if (E.IsReady())
{
InsecSoldier = Orbwalker.ValidAzirSoldiers.Where(it => it.Distance(target) <= (R.Width / 2) - 50).OrderByDescending(it => it.Distance(target)).First();
var targetpos = Prediction.Position.PredictUnitPosition(target, 500).To3D();
var rectangle = new Geometry.Polygon.Rectangle(Player.Position, InsecSoldier.Position, E.Width + target.BoundingRadius);
if (!rectangle.IsInside(targetpos) && InsecSoldier.Distance(target) <= (R.Width / 2) - 50)
{
var EDelay = (int)((((Player.Distance(InsecSoldier) - 100) / 8) * 5));
if (E.Cast(CorrectRange(InsecSoldier.Position, E.Range)))
{
//Delayed insec
Core.DelayAction(delegate
{
if (Player.Spellbook.CastSpell(SpellSlot.Q, CursorCorrectRange(Q.Range)))
{
LastQTime = Game.Time;
}
else WhyIDidThatAddonInsec = false;
}, EDelay);
}
else WhyIDidThatAddonInsec = false;
}
else { WhyIDidThatAddonInsec = false; }
}
else WhyIDidThatAddonInsec = false;
}
return;
}
示例10: UseW
public override void UseW(Obj_AI_Minion minion)
{
if (W.IsReady() && getEnchCount() != 5 && minion.Distance(player) < 340 + minion.BoundingRadius && W.GetDamage(minion) * 0.7f < minion.Health)
{
W.Cast();
}
}
示例11: UseE
public override void UseE(Obj_AI_Minion minion)
{
Console.WriteLine(getEnchCount());
if (E.IsReady() && getEnchCount()!=5 && minion.Distance(player) < 400)
{
E.Cast(minion.Position);
}
}
示例12: WhyInsec
//---------------------------------------WhyInsec()----------------------------------------------------
void WhyInsec(Obj_AI_Base target)
{
//Back distance = 300
//Why I did that
EloBuddy.Player.IssueOrder(GameObjectOrder.MoveTo, target);
var targetpos = Prediction.Position.PredictUnitPosition(target, 500).To3D();
if (!WhyIDidThatAddonInsec && Orbwalker.ValidAzirSoldiers.Any(it => it.Distance(target) >= E.Width + target.BoundingRadius && it.Distance(target) <= (R.Width / 2) - 20))
{
WhyIDidThatAddonInsec = true;
Core.DelayAction(() => WhyIDidThatAddonInsec = false, 3000);
if (E.IsReady())
{
InsecSoldier = Orbwalker.ValidAzirSoldiers.Where(it => it.Distance(target) <= (R.Width / 2) - 20).OrderByDescending(it => it.Distance(target)).First();
var rectangle = new Geometry.Polygon.Rectangle(Player.Position, InsecSoldier.Position, E.Width + target.BoundingRadius);
if (!rectangle.IsInside(targetpos) && InsecSoldier.Distance(target) <= (R.Width / 2) - 50)
{
var EDelay = (int)((((Player.Distance(InsecSoldier) - 100) / 8) * 5));
if (E.Cast(Vectors.CorrectSpellRange(InsecSoldier.Position, E.Range)))
{
//Delayed insec
Core.DelayAction(delegate
{
if (Player.Spellbook.CastSpell(SpellSlot.Q, Vectors.CorrectSpellRange(Game.CursorPos, Q.Range)))
{
LastQTime = Game.Time;
}
else WhyIDidThatAddonInsec = false;
}, EDelay);
}
else WhyIDidThatAddonInsec = false;
}
else { WhyIDidThatAddonInsec = false; }
}
else WhyIDidThatAddonInsec = false;
}
else if (!WhyIDidThatAddonInsec && W.IsReady() && E.IsReady() && Q.IsReady() && W.IsInRange(target))
{
var rectangle = new Geometry.Polygon.Rectangle(Player.Position, targetpos, 2 * (target.BoundingRadius + E.Width + 20));
//rectangle.Draw(System.Drawing.Color.Yellow);
var circle = new Geometry.Polygon.Circle(targetpos, (R.Width - 20)/2);
//circle.Draw(System.Drawing.Color.Red);
var point = circle.Points.Where(it => !NavMesh.GetCollisionFlags(it).HasFlag(CollisionFlags.Wall) && W.IsInRange(it.To3D()) && !rectangle.IsInside(it)).OrderByDescending(it => it.Distance(Player)).FirstOrDefault();
if (point != null && W.Cast(point.To3D()))
{
WhyIDidThatAddonInsec = true;
Core.DelayAction(() => WhyIDidThatAddonInsec = false, 3000);
Core.DelayAction(delegate
{
InsecSoldier = Orbwalker.ValidAzirSoldiers.Where(it => it.Distance(target) <= (R.Width / 2) - 20).OrderByDescending(it => it.Distance(target)).First();
var EDelay = (int)((((Player.Distance(InsecSoldier) - 100) / 8) * 5));
if (E.Cast(Vectors.CorrectSpellRange(InsecSoldier.Position, E.Range)))
{
//Delayed insec
Core.DelayAction(delegate
{
if (Player.Spellbook.CastSpell(SpellSlot.Q, Vectors.CorrectSpellRange(Game.CursorPos, Q.Range)))
{
LastQTime = Game.Time;
}
else WhyIDidThatAddonInsec = false;
}, EDelay);
}
else WhyIDidThatAddonInsec = false;
}, 350);
}
}
return;
}