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


C# LeagueSharp.Cast方法代码示例

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


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

示例1: CastSpell

        public static void CastSpell(LeagueSharp.Common.Spell QWER, AIHeroClient target)
        {
            //   Chat.Print("CastSpell");
             if (getBoxItem(ThreshWarden.PredictConfig, "PredictionMode") == 2)
             {
              //       Chat.Print("SDK");
                 SebbyLib.Movement.SkillshotType CoreType2 = SebbyLib.Movement.SkillshotType.SkillshotLine;
                 bool aoe2 = false;

                 if (QWER.Type == LeagueSharp.Common.SkillshotType.SkillshotCircle)
                 {
                     //CoreType2 = SebbyLib.Movement.SkillshotType.SkillshotCircle;
                     //aoe2 = true;
                 }

                 if (QWER.Width > 80 && !QWER.Collision)
                     aoe2 = true;

                 var predInput2 = new SebbyLib.Movement.PredictionInput
                 {
                     Aoe = aoe2,
                     Collision = QWER.Collision,
                     Speed = QWER.Speed,
                     Delay = QWER.Delay,
                     Range = QWER.Range,
                     From = ThreshWarden.Player.ServerPosition,
                     Radius = QWER.Width,
                     Unit = target,
                     Type = CoreType2
                 };
                 var poutput2 = SebbyLib.Movement.Prediction.GetPrediction(predInput2);

                 //var poutput2 = QWER.GetPrediction(target);

                 if (QWER.Speed != float.MaxValue && SebbyLib.OktwCommon.CollisionYasuo(ThreshWarden.Player.ServerPosition, poutput2.CastPosition))
                     return;

                 if (getBoxItem(ThreshWarden.PredictConfig, "HitChance") == 0)
                 {
                     if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.VeryHigh)
                         QWER.Cast(poutput2.CastPosition);
                     else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= SebbyLib.Movement.HitChance.High)
                     {
                         QWER.Cast(poutput2.CastPosition);
                     }

                 }
                 else if (getBoxItem(ThreshWarden.PredictConfig, "HitChance") == 1)
                 {
                     if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.High)
                         QWER.Cast(poutput2.CastPosition);

                 }
                 else if (getBoxItem(ThreshWarden.PredictConfig, "HitChance") == 2)
                 {
                     if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.Medium)
                         QWER.Cast(poutput2.CastPosition);
                 }
             }
             else
               if(ThreshWarden.getBoxItem(ThreshWarden.PredictConfig, "PredictionMode") == 1)
            {
              //      Chat.Print("OKTW");
                SebbyLib.Prediction.SkillshotType CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotLine;
                bool aoe2 = false;

                if (QWER.Type == LeagueSharp.Common.SkillshotType.SkillshotCircle)
                {
                    CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotCircle;
                    aoe2 = true;
                }

                if (QWER.Width > 80 && !QWER.Collision)
                    aoe2 = true;

                var predInput2 = new SebbyLib.Prediction.PredictionInput
                {
                    Aoe = aoe2,
                    Collision = QWER.Collision,
                    Speed = QWER.Speed,
                    Delay = QWER.Delay,
                    Range = QWER.Range,
                    From = ThreshWarden.Player.ServerPosition,
                    Radius = QWER.Width,
                    Unit = target,
                    Type = CoreType2
                };
                var poutput2 = SebbyLib.Prediction.Prediction.GetPrediction(predInput2);

                //var poutput2 = QWER.GetPrediction(target);

                if (QWER.Speed != float.MaxValue && SebbyLib.OktwCommon.CollisionYasuo(ThreshWarden.Player.ServerPosition, poutput2.CastPosition))
                    return;

                if (getBoxItem(ThreshWarden.PredictConfig, "HitChance") == 0)
                {
                    if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.VeryHigh)
                        QWER.Cast(poutput2.CastPosition);
                    else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High)
                    {
//.........这里部分代码省略.........
开发者ID:yMeliodasNTD,项目名称:PortAIO,代码行数:101,代码来源:SpellQ.cs

示例2: CastR

        private static void CastR(LeagueSharp.Common.Spell R, AIHeroClient t)
        {
            Program.CastSpell(R, t);
            if (getCheckBoxItem(rMenu, "minionR"))
            {
                // collision + predictio R
                var poutput = R.GetPrediction(t);
                var col = poutput.CollisionObjects.Count(ColObj => ColObj.IsEnemy && ColObj.IsMinion && !ColObj.IsDead);

                //hitchance
                var prepos = LeagueSharp.Common.Prediction.GetPrediction(t, 0.4f);

                if (col == 0 && (int)prepos.Hitchance < 5)
                    return;

                float rSplash = 140;
                if (bonusR)
                    rSplash = 290f;

                var minions = Cache.GetMinions(Player.ServerPosition, R.Range - rSplash);
                foreach (var minion in minions.Where(minion => minion.LSDistance(poutput.CastPosition) < rSplash))
                {
                    R.Cast(minion);
                    return;
                }
            }
        }
开发者ID:yashine59fr,项目名称:PortAIO,代码行数:27,代码来源:Corki.cs

示例3: SebbySpell

        private static void SebbySpell(LeagueSharp.Common.Spell QR, Obj_AI_Base target)
        {
            SebbyLib.Prediction.SkillshotType CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotLine;
            bool aoe2 = false;

            if (QR.Type == SkillshotType.SkillshotCircle)
            {
                CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotCircle;
                aoe2 = true;
            }

            if (QR.Width > 80 && !QR.Collision)
                aoe2 = true;

            var predInput2 = new SebbyLib.Prediction.PredictionInput
            {
                Aoe = aoe2,
                Collision = QR.Collision,
                Speed = QR.Speed,
                Delay = QR.Delay,
                Range = QR.Range,
                From = Player.ServerPosition,
                Radius = QR.Width,
                Unit = target,
                Type = CoreType2
            };
            var poutput2 = SebbyLib.Prediction.Prediction.GetPrediction(predInput2);

            if (QR.Speed != float.MaxValue && OktwCommon.CollisionYasuo(Player.ServerPosition, poutput2.CastPosition))
                return;

            if (HitChanceMenu["HitChance"].Cast<ComboBox>().CurrentValue == 0)
            {
                if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.Medium)
                    QR.Cast(poutput2.CastPosition);
            }
            else if (HitChanceMenu["HitChance"].Cast<ComboBox>().CurrentValue == 1)
            {
                if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High)
                    QR.Cast(poutput2.CastPosition);

            }
            else if (HitChanceMenu["HitChance"].Cast<ComboBox>().CurrentValue == 2)
            {
                if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.VeryHigh)
                    QR.Cast(poutput2.CastPosition);
            }
        }
开发者ID:yMeliodasNTD,项目名称:PortAIO,代码行数:48,代码来源:Program.cs


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