• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# MinionTeam类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中MinionTeam的典型用法代码示例。如果您正苦于以下问题:C# MinionTeam类的具体用法?C# MinionTeam怎么用?C# MinionTeam使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



MinionTeam类属于命名空间,在下文中一共展示了MinionTeam类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GetMinions

 public static List<Obj_AI_Minion> GetMinions(Vector3 from, float range, MinionTypes type = MinionTypes.All,
     MinionTeam team = MinionTeam.Enemy, MinionOrderTypes order = MinionOrderTypes.Health)
 {
     var result = from minion in ObjectManager.Get<Obj_AI_Minion>()
         where minion.IsValidTarget(range, false, @from)
         let minionTeam = minion.Team
         where
             (team == MinionTeam.Neutral && minionTeam == GameObjectTeam.Neutral)
             || (team == MinionTeam.Ally
                 && minionTeam
                 == (myHero.Team == GameObjectTeam.Chaos ? GameObjectTeam.Chaos : GameObjectTeam.Order))
             || (team == MinionTeam.Enemy
                 && minionTeam
                 == (myHero.Team == GameObjectTeam.Chaos ? GameObjectTeam.Order : GameObjectTeam.Chaos))
             || (team == MinionTeam.NotAlly && minionTeam != myHero.Team)
             || (team == MinionTeam.NotAllyForEnemy
                 && (minionTeam == myHero.Team || minionTeam == GameObjectTeam.Neutral))
             || team == MinionTeam.All
         where
             (minion.IsMelee() && type == MinionTypes.Melee)
             || (!minion.IsMelee() && type == MinionTypes.Ranged) || type == MinionTypes.All
         where MinionManager.IsMinion(minion) || minionTeam == GameObjectTeam.Neutral || IsPet(minion)
         select minion;
     switch (order)
     {
         case MinionOrderTypes.Health:
             result = result.OrderBy(i => i.Health);
             break;
         case MinionOrderTypes.MaxHealth:
             result = result.OrderBy(i => i.MaxHealth).Reverse();
             break;
     }
     return result.ToList();
 }
开发者ID:Xelamats,项目名称:PortAIO,代码行数:34,代码来源:Helper.cs


示例2: IsCanLastHit

        public static Tuple<bool, Obj_AI_Base> IsCanLastHit(Vector3 from, float range, MinionTypes _MinionType, MinionTeam _MinionTeam, MinionOrderTypes _MinionOrderType, bool _IsRanged)
        {
            bool result = false;
            Obj_AI_Base target = null;

            if (HasTargonItem && !player.IsDead && player.Buffs.Any(x => x.Count > 0 && x.Name == "talentreaperdisplay") && IsAllyInRange(1500))
            {
                var minions = MinionManager.GetMinions(from, range, _MinionType, _MinionTeam, _MinionOrderType);
                var itemNum = player.InventoryItems.Any(x => x.Id == ItemId.Face_of_the_Mountain || x.Id == ItemId.Relic_Shield || x.Id == ItemId.Targons_Brace);

                foreach(var minion in minions)
                {
                    var a = player.Buffs.Any(x => x.DisplayName.Contains("ThreshPassiveSoulsGain")) ? player.Buffs.Find(x => x.DisplayName.Contains("ThreshPassiveSoulsGain")).Count : 0;
                    var dmg = _IsRanged ? player.GetAutoAttackDamage(minion) + a : GetItemDmg();

                    if (minion.Health < dmg && player.CanAttack && Orbwalking.InAutoAttackRange(minion))
                    {
                        result = true;
                        target = minion;
                    }
                }
            }

            return new Tuple<bool, Obj_AI_Base>(result, target);
        }
开发者ID:fgpmaia123,项目名称:KaiserSharp,代码行数:25,代码来源:Helper.cs


示例3: GetMinions

 public static List<Obj_AI_Base> GetMinions(float range,
     MinionTypes type = MinionTypes.All,
     MinionTeam team = MinionTeam.Enemy,
     MinionOrderTypes order = MinionOrderTypes.Health)
 {
     return GetMinions(ObjectManager.Player.ServerPosition, range, type, team, order);
 }
开发者ID:lolscripts,项目名称:Aka-s,代码行数:7,代码来源:MinionManager.cs


示例4: GetMinions

        /// <summary>
        /// Returns the minions in range from From.
        /// </summary>
        public static List<Obj_AI_Base> GetMinions(Vector3 from,
            float range,
            MinionTypes type = MinionTypes.All,
            MinionTeam team = MinionTeam.Enemy,
            MinionOrderTypes order = MinionOrderTypes.Health)
        {
            var result = new List<Obj_AI_Base>();

            foreach (var minion in ObjectManager.Get<Obj_AI_Minion>())
            {
                if (minion.IsValidTarget(range, false))
                {
                    if (team == MinionTeam.Neutral && minion.Team == GameObjectTeam.Neutral ||
                        team == MinionTeam.Ally &&
                        minion.Team ==
                        (ObjectManager.Player.Team == GameObjectTeam.Chaos ? GameObjectTeam.Chaos : GameObjectTeam.Order) ||
                        team == MinionTeam.Enemy &&
                        minion.Team ==
                        (ObjectManager.Player.Team == GameObjectTeam.Chaos ? GameObjectTeam.Order : GameObjectTeam.Chaos) ||
                        team == MinionTeam.NotAlly && minion.Team != ObjectManager.Player.Team ||
                        team == MinionTeam.NotAllyForEnemy &&
                        (minion.Team == ObjectManager.Player.Team || minion.Team == GameObjectTeam.Neutral) ||
                        team == MinionTeam.All)
                    {
                        if (minion.IsMelee() && type == MinionTypes.Melee ||
                            !minion.IsMelee() && type == MinionTypes.Ranged || type == MinionTypes.All)
                        {
                            result.Add(minion);
                        }
                    }
                }
            }

            if (order == MinionOrderTypes.Health)
            {
                result = result.OrderBy(o => o.Health).ToList();
            }
            else if (order == MinionOrderTypes.MaxHealth)
            {
                result = result.OrderBy(o => o.MaxHealth).Reverse().ToList();
            }

            return result;
        }
开发者ID:ramboozer,项目名称:LeagueSharpCommon,代码行数:47,代码来源:MinionManager.cs


示例5: GetMinions

 public static List<Obj_AI_Base> GetMinions(Vector3 from, float range = float.MaxValue,
     MinionTeam team = MinionTeam.Enemy)
 {
     if (team == MinionTeam.Enemy)
     {
         return MinionsListEnemy.FindAll(minion => CanReturn(minion, from, range));
     }
     if (team == MinionTeam.Ally)
     {
         return MinionsListAlly.FindAll(minion => CanReturn(minion, @from, range));
     }
     if (team == MinionTeam.Neutral)
     {
         return
             MinionsListNeutral.Where(minion => CanReturn(minion, @from, range))
                 .OrderByDescending(minion => minion.MaxHealth)
                 .ToList();
     }
     return AllMinionsObj.FindAll(minion => CanReturn(minion, @from, range));
 }
开发者ID:Xelamats,项目名称:PortAIO,代码行数:20,代码来源:Cache.cs


示例6: GetMinions

        /// <summary>
        ///     Returns the minions in range from From.
        /// </summary>
        public static List<Obj_AI_Base> GetMinions(Vector3 from,
            float range,
            MinionTypes type = MinionTypes.All,
            MinionTeam team = MinionTeam.Enemy,
            MinionOrderTypes order = MinionOrderTypes.Health)
        {
            var result = (from minion in GameObjects.Minions.Concat(GameObjects.Jungle)
                where minion.IsValidTarget(range, false, @from)
                let minionTeam = minion.Team
                where
                    team == MinionTeam.Neutral && minionTeam == GameObjectTeam.Neutral ||
                    team == MinionTeam.Ally &&
                    minionTeam ==
                    (ObjectManager.Player.Team == GameObjectTeam.Chaos ? GameObjectTeam.Chaos : GameObjectTeam.Order) ||
                    team == MinionTeam.Enemy &&
                    minionTeam ==
                    (ObjectManager.Player.Team == GameObjectTeam.Chaos ? GameObjectTeam.Order : GameObjectTeam.Chaos) ||
                    team == MinionTeam.NotAlly && minionTeam != ObjectManager.Player.Team ||
                    team == MinionTeam.NotAllyForEnemy &&
                    (minionTeam == ObjectManager.Player.Team || minionTeam == GameObjectTeam.Neutral) ||
                    team == MinionTeam.All
                where
                    minion.IsMelee() && type == MinionTypes.Melee || !minion.IsMelee() && type == MinionTypes.Ranged ||
                    type == MinionTypes.All
                where IsMinion(minion) || minionTeam == GameObjectTeam.Neutral
                select minion).Select(m => m as Obj_AI_Base).ToList();

            switch (order)
            {
                case MinionOrderTypes.Health:
                    result = result.OrderBy(o => o.Health).ToList();
                    break;
                case MinionOrderTypes.MaxHealth:
                    result = result.OrderBy(o => o.MaxHealth).Reverse().ToList();
                    break;
            }

            return result;
        }
开发者ID:juan2202,项目名称:LeagueSharp-Standalones,代码行数:42,代码来源:MinionManager.cs


示例7: Cast_onMinion_nearEnemy

		public void Cast_onMinion_nearEnemy(Spell spell, float range, SimpleTs.DamageType damageType = SimpleTs.DamageType.Physical, MinionTypes minionTypes = MinionTypes.All, MinionTeam minionTeam = MinionTeam.All)
		{
			if(!spell.IsReady() || !ManaManagerAllowCast(spell))
				return;
			var target = SimpleTs.GetTarget(spell.Range + range, damageType);
			Obj_AI_Base[] nearstMinion = { null };
			var allminions = MinionManager.GetMinions(target.Position, range, minionTypes, minionTeam);
			foreach(var minion in allminions.Where(minion => minion.Distance(ObjectManager.Player) <= spell.Range && minion.Distance(target) <= range).Where(minion => nearstMinion[0] == null || nearstMinion[0].Distance(target) >= minion.Distance(target)))
				nearstMinion[0] = minion;

			if(nearstMinion[0] != null)
				spell.CastOnUnit(nearstMinion[0], Packets());
		}
开发者ID:Imatation,项目名称:LS-,代码行数:13,代码来源:Champion.cs


示例8: GetFarmLocation

 public static MinionManager.FarmLocation? GetFarmLocation(this Spell spell, MinionTeam team = MinionTeam.Enemy, List<Obj_AI_Base> targets = null)
 {
     // Get minions if not set
     if (targets == null)
         targets = MinionManager.GetMinions(spell.Range, MinionTypes.All, team, MinionOrderTypes.MaxHealth);
     // Validate
     if (!spell.IsSkillshot || targets.Count == 0)
         return null;
     // Predict minion positions
     var positions = MinionManager.GetMinionsPredictedPositions(targets, spell.Delay, spell.Width, spell.Speed, spell.From, spell.Range, spell.Collision, spell.Type);
     // Get best location to shoot for those positions
     var farmLocation = MinionManager.GetBestLineFarmLocation(positions, spell.Width, spell.Range);
     if (farmLocation.MinionsHit == 0)
         return null;
     return farmLocation;
 }
开发者ID:a544243739,项目名称:LeagueSharp,代码行数:16,代码来源:SpellManager.cs


示例9: GetMinions

        public static List<Obj_AI_Base> GetMinions(Vector3 from,
            float range,
            MinionTypes type = MinionTypes.All,
            MinionTeam team = MinionTeam.Enemy,
            MinionOrderTypes order = MinionOrderTypes.Health)
        {
            var result = (from minion in ObjectManager.Get<Obj_AI_Minion>()
                          where minion.IsValidTarget(range, false, @from)
                          let minionTeam = minion.Team
                          where
                              team == MinionTeam.Neutral && minionTeam == GameObjectTeam.Neutral ||
                              team == MinionTeam.Ally &&
                              minionTeam ==
                              (ObjectManager.Player.Team == GameObjectTeam.Chaos ? GameObjectTeam.Chaos : GameObjectTeam.Order) ||
                              team == MinionTeam.Enemy &&
                              minionTeam ==
                              (ObjectManager.Player.Team == GameObjectTeam.Chaos ? GameObjectTeam.Order : GameObjectTeam.Chaos) ||
                              team == MinionTeam.NotAlly && minionTeam != ObjectManager.Player.Team ||
                              team == MinionTeam.NotAllyForEnemy &&
                              (minionTeam == ObjectManager.Player.Team || minionTeam == GameObjectTeam.Neutral) ||
                              team == MinionTeam.All
                          where
                              !minion.IsRanged && type == MinionTypes.Melee || minion.IsRanged && type == MinionTypes.Ranged ||
                              type == MinionTypes.All
                          where IsMinion(minion) || minionTeam == GameObjectTeam.Neutral && minion.MaxHealth > 5 && minion.IsHPBarRendered
                          select minion).Cast<Obj_AI_Base>().ToList();

            switch (order)
            {
                case MinionOrderTypes.Health:
                    result = result.OrderBy(o => o.Health).ToList();
                    break;
                case MinionOrderTypes.MaxHealth:
                    result = result.OrderByDescending(o => o.MaxHealth).ToList();
                    break;
            }

            return result;
        }
开发者ID:chienhao10,项目名称:Elobuddy-10,代码行数:39,代码来源:Prediction.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# MinionTypes类代码示例发布时间:2022-05-24
下一篇:
C# MinionOrderTypes类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap