当前位置: 首页>>代码示例>>C#>>正文


C# AIHeroClient.CountEnemiesInRange方法代码示例

本文整理汇总了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());
            }
        }
开发者ID:mariogk,项目名称:EB,代码行数:34,代码来源:Functions.cs

示例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;
        }
开发者ID:,项目名称:,代码行数:29,代码来源:

示例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);
            }
        }
开发者ID:giaanthunder,项目名称:EloBuddy,代码行数:19,代码来源:Items.cs

示例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());
            }
        }
开发者ID:NecronomiconCoding,项目名称:EloBuddy-Addons,代码行数:12,代码来源:Program.cs

示例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"));
     }
 }
开发者ID:yashine59fr,项目名称:PortAIO,代码行数:9,代码来源:Program.cs


注:本文中的AIHeroClient.CountEnemiesInRange方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。