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


C# Spell.GetLineFarmLocation方法代码示例

本文整理汇总了C#中LeagueSharp.Common.Spell.GetLineFarmLocation方法的典型用法代码示例。如果您正苦于以下问题:C# Spell.GetLineFarmLocation方法的具体用法?C# Spell.GetLineFarmLocation怎么用?C# Spell.GetLineFarmLocation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LeagueSharp.Common.Spell的用法示例。


在下文中一共展示了Spell.GetLineFarmLocation方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CastBasicFarm

        public static void CastBasicFarm(Spell spell)
        {
            if (!spell.IsReady())
                return;
            var minion = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, spell.Range, MinionTypes.All, MinionTeam.NotAlly);

            if (minion.Count == 0)
                return;

            if (spell.Type == SkillshotType.SkillshotCircle)
            {
                spell.UpdateSourcePosition();

                var predPosition = spell.GetCircularFarmLocation(minion);

                if (predPosition.MinionsHit >= 2)
                {
                    spell.Cast(predPosition.Position);
                }
            }
            else if (spell.Type == SkillshotType.SkillshotLine || spell.Type == SkillshotType.SkillshotCone)
            {
                spell.UpdateSourcePosition();

                var predPosition = spell.GetLineFarmLocation(minion);

                if (predPosition.MinionsHit >= 2)
                    spell.Cast(predPosition.Position);
            }
        }
开发者ID:myo,项目名称:LSharp,代码行数:30,代码来源:SpellCastManager.cs

示例2: Farm

        public static void Farm(Spell spell, int minHit = 2, float overrideWidth = -1f)
        {
            if (!spell.IsReady())
            {
                return;
            }
            var minions =
                MinionManager.GetMinions(
                    ObjectManager.Player.ServerPosition, spell.Range, MinionTypes.All, MinionTeam.NotAlly,
                    MinionOrderTypes.MaxHealth).ToList();

            if (minions.Count == 0)
            {
                return;
            }

            if (spell.Type == SkillshotType.SkillshotCircle)
            {
                spell.UpdateSourcePosition();

                var prediction = spell.GetCircularFarmLocation(minions, overrideWidth);
                if (prediction.MinionsHit >= minHit)
                {
                    spell.Cast(prediction.Position);
                }
            }
            else if (spell.Type == SkillshotType.SkillshotLine)
            {
                spell.UpdateSourcePosition();

                var prediction = spell.GetLineFarmLocation(minions, overrideWidth);
                if (prediction.MinionsHit >= minHit)
                {
                    spell.Cast(prediction.Position);
                }
            }
        }
开发者ID:lukasi273,项目名称:SFX-5.12-update,代码行数:37,代码来源:Casting.cs

示例3: CastBasicFarm

        protected void CastBasicFarm(Spell spell)
        {
            if(!spell.IsReady())
				return;
            var minion = MinionManager.GetMinions(Player.ServerPosition, spell.Range, MinionTypes.All, MinionTeam.NotAlly);

            if (minion.Count == 0)
                return;

            if (spell.Type == SkillshotType.SkillshotCircle)
            {
                spell.UpdateSourcePosition();

                var predPosition = spell.GetCircularFarmLocation(minion);

                if (predPosition.MinionsHit >= 2)
                {
                    spell.Cast(predPosition.Position, Player.ChampionName == "Kartus" || packets());
                }
            }
            else if (spell.Type == SkillshotType.SkillshotLine)
            {
                spell.UpdateSourcePosition();

                var predPosition = spell.GetLineFarmLocation(minion);

                if(predPosition.MinionsHit >= 2)
                    spell.Cast(predPosition.Position, packets());
            }
        }
开发者ID:leenam0910,项目名称:LSharp,代码行数:30,代码来源:Champion.cs


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