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


C# GameObjectProcessSpellCastEventArgs.IsAutoAttack方法代码示例

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


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

示例1: Obj_AI_Base_OnSpellCast

 static void Obj_AI_Base_OnSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     if (sender.IsMe && args.IsAutoAttack() && Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
     {
         var target = args.Target as AIHeroClient;
         if (target != null && )
     }
 }
开发者ID:KoalaHuman,项目名称:EloBuddy,代码行数:8,代码来源:Program.cs

示例2: OnSpellCast

 private static void OnSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     if (sender.IsMe)
     {
         if (args.IsAutoAttack())
         {
             if (Orbwalker.ActiveModesFlags != Orbwalker.ActiveModes.None)
             {
                 if (ShouldAA)
                 {
                     Orbwalker.ResetAutoAttack();
                     if (Player.Instance.IsInAutoAttackRange(args.Target as AttackableUnit))
                     {
                         Player.IssueOrder(GameObjectOrder.AttackTo, args.Target);
                     }
                     ShouldAA = false;
                     return;
                 }
                 if (ShouldQ)
                 {
                     SpellManager.Q.Cast();
                     Orbwalker.ResetAutoAttack();
                     if (Player.Instance.IsInAutoAttackRange(args.Target as AttackableUnit) )
                     {
                         Player.IssueOrder(GameObjectOrder.AttackTo, args.Target);
                     }
                     ShouldAA = true;
                     ShouldQ = false;
                     return;
                 }
             }
         }
         if (args.Slot == SpellSlot.Q)
         {
             Orbwalker.ResetAutoAttack();
         }
     }
 }
开发者ID:Enochen,项目名称:EloBuddy,代码行数:38,代码来源:ModeManager.cs

示例3: Obj_AI_Base_OnProcessSpellCast

 private static void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     var target = args.Target as Obj_AI_Base;
     var senderHero = sender as AIHeroClient;
     if (args.IsAutoAttack()) return;
     if (senderHero != null && senderHero.IsEnemy)
     {
         if (target != null && target.IsAlly)
         {
             var targettedSpell = new TargetSpell(target, senderHero, senderHero.Hero, args.Slot);
             TargettedSpells.Add(targettedSpell);
             Core.DelayAction(() => TargettedSpells.Remove(targettedSpell), 80);
         }
     }
 }
开发者ID:Casanje,项目名称:ItsMeMario,代码行数:15,代码来源:DangerHandler.cs

示例4: Obj_AI_Base_OnSpellCast

 static void Obj_AI_Base_OnSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     //Chat.Print(args.IsAutoAttack());
     if (sender.IsMe && args.IsAutoAttack() && Hydra != null && Hydra.IsReady() && args.Target is AIHeroClient)
     {
         Hydra.Cast();
     }
 }
开发者ID:KoalaHuman,项目名称:EloBuddy,代码行数:8,代码来源:Zed.cs

示例5: AfterAttack

        private static void AfterAttack(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!sender.IsMe) return;

            if (args.SData.Name == "ItemTitanicHydraCleave")
            {
                // because we want another auto after this
                Orbwalker.ResetAutoAttack();
                return;
            }
            if (!args.IsAutoAttack()) return;
            Utils.Debug("ondos " + Core.GameTickCount);
            var target = args.Target as AttackableUnit;
            if (Orbwalker.ActiveModesFlags != Orbwalker.ActiveModes.None && target != null && target.IsValidTarget())
            {
                if (!Q.IsReady() && CanCastHydra())
                    Hydra.Cast();
                if (Cooldown(Player.Spells[0]) > 1.0f && !W.IsReady() && CanCastTitan())
                    Titan.Cast();
                lastAA = Core.GameTickCount;
                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
                {
                    if ((Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)))
                    {
                        if (QNum >= 1 && W.IsReady())
                        {

                            var target2 = (ComboTarget != null && ComboTarget.IsValidTarget(WRange)) ? ComboTarget :
                            TargetSelector.GetTarget(WRange, DamageType.Physical, null, true);
                            if (target2 != null && target2.IsValidTarget() && CanCastTitan())
                            {
                                Titan.Cast();
                                Player.IssueOrder(GameObjectOrder.AttackUnit, target2);
                                return;
                            }
                            if (target2 != null && target2.IsValidTarget() && !CanCastHydra())
                            {
                                Player.CastSpell(SpellSlot.W);
                                return;
                            }
                            if (CanCastHydra())
                            {
                                Hydra.Cast();
                                return;
                            }
                            if (R.IsReady() && R.Name != R1)
                            {
                                var enemy = EntityManager.Heroes.Enemies.FirstOrDefault(h => (h.Distance(Player.Instance) < R.Range - 50) && RDamage(h) > h.Health && h.IsValidTarget());
                                if (enemy != null)
                                {
                                    forceR2 = true;
                                    R2Target = enemy;
                                    Core.DelayAction(() => forceR2 = false, 750);
                                }
                            }

                        }
                    }
                    if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
                    {

                        if (QNum >= 1 && W.IsReady())
                        {
                            var target2 = (JCTarget != null && JCTarget.IsValidTarget(WRange)) ? JCTarget : EntityManager.MinionsAndMonsters.GetJungleMonsters(null, WRange, true).FirstOrDefault();
                            if (target2 != null && target2.IsValidTarget() && CanCastTitan())
                            {
                                Titan.Cast();
                                Player.IssueOrder(GameObjectOrder.AttackUnit, target2);
                                return;
                            }
                            if (target2 != null && target2.IsValidTarget() && !CanCastHydra())
                            {
                                Player.CastSpell(SpellSlot.W);
                                return;
                            }
                            if (CanCastHydra())
                                Hydra.Cast();

                        }
                    }

                    if (Mode != Orbwalker.ActiveModes.None && target.IsValidTarget(Q.Range) && target.IsValid && !target.IsDead && !target.IsZombie)
                    {
                        if (Q.IsReady())
                        {
                            Player.CastSpell(SpellSlot.Q, target.Position);
                            return;
                        }
                    }
                    if (Cooldown(Player.Spells[0]) > 1.0f && W.IsReady() && Player.Instance.CountEnemiesInRange(WRange) > 0)
                    {
                        Player.CastSpell(SpellSlot.W);
                        return;
                    }
                }

            }
        }
开发者ID:KoalaHuman,项目名称:EloBuddy,代码行数:98,代码来源:Program.cs

示例6: Obj_AI_Base_OnSpellCast

 static void Obj_AI_Base_OnSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     if (sender.IsMe && args.IsAutoAttack())
         debugDictionary["OLD"] = Core.GameTickCount+"";
 }
开发者ID:KoalaHuman,项目名称:EloBuddy,代码行数:5,代码来源:Riven.cs

示例7: ChecarSendoatacado

 internal static void ChecarSendoatacado(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     if (!Multi["AtvSeg"].Cast<KeyBind>().CurrentValue) return;
     if (sender.IsMe)
     {
         if (args.IsAutoAttack()) return;
         UltCast = Environment.TickCount;
         if (Environment.TickCount <= UltCast + 300 || Environment.TickCount <= UltClick + 500)
         {
             args.Process = false;
         }
     }
     if (sender.Distance(Eu) >= 1300 || !sender.IsEnemy) return;
     if (args.Target == null) return;
     if (!sender.IsEnemy || !args.Target.IsMe) return;
     if (Orbwalker.ActiveModesFlags != Orbwalker.ActiveModes.None)
     {
         Orbwalker.ActiveModesFlags = Orbwalker.ActiveModes.None;
     }
     Fugir = true;
     MeAtacou = sender;
 }
开发者ID:andre23andre,项目名称:A23A_MultiUtility,代码行数:22,代码来源:TudoJuntoEmisturado.cs


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