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


C# Obj_AI_Base.UnderTurret方法代码示例

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


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

示例1: OnProcessSpellCast

        private static void OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (sender == null || !sender.IsValid || args == null)
            {
                return;
            }

            var target = args.Target;

            if (target == null || !target.IsValid)
            {
                return;
            }

            if (sender.IsMe && sender.UnderTurret(true) && target.IsEnemy)
            {

            }

            if (sender is Obj_AI_Turret && target.IsMe)
            {

            }

            if (sender is Obj_AI_Minion && target.IsMe)
            {
                var orbwalkingPos = new Vector2
                {
                    X = ObjectManager.Player.Position.X + ObjConstants.DefensiveAdditioner,
                    Y = ObjectManager.Player.Position.Y + ObjConstants.DefensiveAdditioner
                };
                ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, orbwalkingPos.To3D());
            }
        }
开发者ID:werdbrian,项目名称:AIM-1,代码行数:34,代码来源:Carry.cs

示例2: OnProcessSpellCast

 private static void OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     if (sender.IsMe && sender.UnderTurret(true) && args.Target.IsEnemy && args.Target.Type == GameObjectType.obj_AI_Hero)
     {
         _overrideAttackUnitAction = true;
     }
 }
开发者ID:Hyunabstar,项目名称:Experimental,代码行数:7,代码来源:Autoplay.cs

示例3: TargetSkill

        public static void TargetSkill(Obj_AI_Base target, Spell spell, bool packet = false, bool towerCheck = false)
        {
            if (!spell.IsReady())
            {
                return;
            }

            if (target == null || towerCheck && target.UnderTurret(true))
            {
                return;
            }

            spell.Cast(target, packet);
        }
开发者ID:lukasi273,项目名称:SFX-5.12-update,代码行数:14,代码来源:Casting.cs

示例4: SkillShot

        public static void SkillShot(Obj_AI_Base target,
            Spell spell,
            HitChance hitChance,
            bool aoe = false,
            bool towerCheck = false)
        {
            if (!spell.IsReady())
            {
                return;
            }

            if (target == null || towerCheck && target.UnderTurret(true))
            {
                return;
            }

            spell.UpdateSourcePosition();

            var prediction = spell.GetPrediction(target, aoe);
            if (prediction.Hitchance >= hitChance)
            {
                spell.Cast(prediction.CastPosition);
            }
        }
开发者ID:lukasi273,项目名称:SFX-5.12-update,代码行数:24,代码来源:Casting.cs

示例5: CastE

 private static bool CastE(Obj_AI_Base target, bool skipCheck = false)
 {
     return (skipCheck || !getCheckBoxItem(eMenu, "ETurret") || !target.UnderTurret(true)) &&
            E.CastOnUnit(target);
 }
开发者ID:yashine59fr,项目名称:PortAIO,代码行数:5,代码来源:Katarina.cs

示例6: CastW

        public static bool CastW(Obj_AI_Base target)
        {
            if (!W.IsReady() || !target.IsValidTarget(W.Range) ||
                (Menu.Item("WTurret").IsActive() && target.UnderTurret(true)))
            {
                return false;
            }

            return W.Cast(target).IsCasted();
        }
开发者ID:4caky,项目名称:LeagueSharp,代码行数:10,代码来源:Program.cs

示例7: CheckForRetreat

 private static bool CheckForRetreat(Obj_AI_Base enemy, Vector3 pos)
 {
     if (_GameInfo.GameState == State.Jungling)
     {
         return false;
     }
     if (enemy != null && !enemy.UnderTurret(true) && player.Distance(enemy) < 350 && !_GameInfo.AttackedByTurret)
     {
         return false;
     }
     var indanger = ((Helpers.GetHealth(true, pos) +
                      ((player.Distance(pos) < GameInfo.ChampionRange) ? 0 : player.Health)) * 1.3f <
                     Helpers.GetHealth(false, pos) && pos.CountEnemiesInRange(GameInfo.ChampionRange) > 1 &&
                     Helpers.AlliesThere(pos, 500) == 0) ||
                    player.HealthPercent < menu.Item("HealtToBack").GetValue<Slider>().Value;
     if (indanger || _GameInfo.AttackedByTurret)
     {
         if (((enemy != null && Helpers.AlliesThere(pos, 600) > 0) && player.HealthPercent > 25))
         {
             return false;
         }
         if (_GameInfo.AttackedByTurret)
         {
             if ((enemy != null &&
                  (enemy.Health > player.GetAutoAttackDamage(enemy, true) * 2 ||
                   enemy.Distance(player) > Orbwalking.GetRealAutoAttackRange(enemy) + 20) || enemy == null))
             {
                 return true;
             }
         }
         if (indanger)
         {
             return true;
         }
     }
     return false;
 }
开发者ID:chienhao10,项目名称:LeagueSharp.BOT,代码行数:37,代码来源:Program.cs

示例8: Obj_AI_Base_OnIssueOrder

        private static void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args)
        {
            if (sender == null || !sender.IsValid || !sender.IsMe)
            {
                return;
            }

            int mvmtDelay = Randoms.Rand.Next(200, 770);
            if (args.Order == GameObjectOrder.MoveTo)
            {
                if (ObjectManager.Player.HasBuff("SionR"))
                    return;
                if (Environment.TickCount - LastMove < mvmtDelay)
                {
                    args.Process = false;
                    //	LastMove = Environment.TickCount;
                    return;
                }

                LastMove = Environment.TickCount;
            }

            if (args.Target == null)
            {
                return;
            }

            if (args.Target.IsEnemy && args.Target is Obj_AI_Hero
            && sender.UnderTurret(true)
                && (args.Order == GameObjectOrder.AutoAttack || args.Order == GameObjectOrder.AttackUnit))
            {
                args.Process = false;
            }
        }
开发者ID:werdbrian,项目名称:AIM-1,代码行数:34,代码来源:Base.cs

示例9: CastE

 private static bool CastE(Obj_AI_Base target, bool skipCheck = false)
 {
     return (skipCheck || !Menu.Item("ETurret").IsActive() || !target.UnderTurret(true)) && E.CastOnUnit(target);
 }
开发者ID:TenminsPark,项目名称:LeagueSharp,代码行数:4,代码来源:Katarina.cs


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