本文整理汇总了C#中AIHeroClient.CountEnemiesInRange方法的典型用法代码示例。如果您正苦于以下问题:C# AIHeroClient.CountEnemiesInRange方法的具体用法?C# AIHeroClient.CountEnemiesInRange怎么用?C# AIHeroClient.CountEnemiesInRange使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AIHeroClient
的用法示例。
在下文中一共展示了AIHeroClient.CountEnemiesInRange方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CastR
public static void CastR(AIHeroClient target, int minimunE)
{
if (target != null && target.CountEnemiesInRange(1000) == 1 && minimunE == 1)
{
if (target.IsMoving)
{
var initPos = target.Position.To2D() - 125*target.Direction.To2D().Perpendicular();
var endPos = target.Position.Extend(initPos.To3D(), -1000);
Player.CastSpell(SpellSlot.R, initPos.To3D(), endPos.To3D());
}
else
{
var initPos = target.Position.To2D() - 490*target.Direction.To2D().Perpendicular();
var endPos = target.Position.Extend(initPos.To3D(), -510);
Player.CastSpell(SpellSlot.R, initPos.To3D(), endPos.To3D());
}
}
if (target != null && target.CountEnemiesInRange(1000) > 1 && minimunE > 1)
{
var enemies = EntityManager.Heroes.Enemies.Where(e => e.IsValidTarget()).Select(enemy => enemy.Position.To2D()).ToList();
var initPos = target.Position.To2D() - 200 * target.Direction.To2D().Perpendicular();
var endPos = GetBestEnPos(enemies, SpellManager.R.Width, 990, minimunE, initPos);
Chat.Print("Casting Ult");
Player.CastSpell(SpellSlot.R, initPos.To3D(), endPos.To3D());
}
}
示例2: HeroCardSelection
public static Cards HeroCardSelection(AIHeroClient t, Menu menu)
{
if (t == null || menu == null) return Cards.None;
var card = Cards.None;
var alliesaroundTarget = t.CountEnemiesInRange(200);
var enemyW = menu["enemyW"].Cast<Slider>().CurrentValue;
var manaW = menu["manaW"].Cast<Slider>().CurrentValue;
if (Player.Instance.ManaPercent <= manaW)
{
card = Cards.Blue;
return card;
}
if (Player.Instance.ManaPercent > manaW && alliesaroundTarget >= enemyW)
{
card = Cards.Red;
return card;
}
if (Player.Instance.ManaPercent > manaW && alliesaroundTarget < enemyW)
{
card = Cards.Yellow;
return card;
}
return card;
}
示例3: Special
private static void Special(Item item, AIHeroClient target)
{
if (!target.IsValidTarget(550)
|| !Config.MiscMenu["item.4"].Cast<CheckBox>().CurrentValue
|| Config.MiscMenu["item.4mng"].Cast<Slider>().CurrentValue <= target.CountEnemiesInRange(400))
{
return;
}
var slot4 = Player.Instance.InventoryItems.FirstOrDefault(x => x.Id == item.Id);
if (slot4 != null
&& Spells.R.IsReady()
&& target.CountEnemiesInRange(450) >= Config.MiscMenu["item.4mng"].Cast<Slider>().CurrentValue
&& Player.GetSpell(slot4.SpellSlot).IsReady)
{
Spells.R.Cast();
Player.CastSpell(slot4.SpellSlot);
}
}
示例4: HandleRCombo
private static void HandleRCombo(AIHeroClient target)
{
var tower =
ObjectManager.Get<Obj_AI_Turret>()
.FirstOrDefault(x => x.IsValid && x.IsEnemy && x.Distance(EloBuddy.Player.Instance) < SpellR.Range);
if (target.IsValidTarget(SpellR.Range + SpellE.Range) && (SpellQ.IsReady() || SpellE.IsReady()) &&
ComboDamage(target) > target.Health && tower == null && target.CountEnemiesInRange(400) < 3)
{
SpellR.Cast(Player.ServerPosition.Extend(Game.CursorPos, SpellR.Range).To3D());
}
}
示例5: CastR
private void CastR(AIHeroClient target)
{
if (R.IsReady() && !maoR &&
player.Mana/player.MaxMana*100 > getSliderItem(comboMenu, "rmana") &&
getSliderItem(comboMenu, "user") <= target.CountEnemiesInRange(R.Range - 50))
{
R.Cast(getCheckBoxItem(config, "packets"));
}
}