當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。