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

C# SDK.Events类代码示例

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

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



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

示例1: OnGapCloser

        /// <summary>
        ///     Fired on an incoming gapcloser.
        /// </summary>
        /// <param name="sender">The object.</param>
        /// <param name="args">The <see cref="Events.GapCloserEventArgs" /> instance containing the event data.</param>
        public static void OnGapCloser(object sender, Events.GapCloserEventArgs args)
        {
            if (!Vars.getCheckBoxItem(Vars.Menu, "enable") ||
                !Vars.getKeyBindItem(Vars.Menu, "keybind") ||
                !Vars.getCheckBoxItem(Vars.EMenu, "dashpred"))
            {
                return;
            }

            /// <summary>
            ///     The Dash-Condemn Prediction Logic.
            /// </summary>
            if (Vars.E.IsReady() &&
                Vars.Flash.IsReady() &&
                !GameObjects.Player.IsDashing() &&
                args.Sender.LSIsValidTarget(Vars.E.Range) &&
                !Invulnerable.Check(args.Sender, DamageType.Magical, false) &&
                GameObjects.Player.Distance(args.End) >
                    GameObjects.Player.BoundingRadius &&
                Vars.getCheckBoxItem(Vars.WhiteListMenu, args.Sender.ChampionName.ToLower()))
            {
                for (var i = 1; i < 10; i++)
                {
                    if ((args.End - Vector3.Normalize(args.End - GameObjects.Player.ServerPosition) * (float)(i * 42.5)).LSIsWall() &&
                        (args.End - Vector3.Normalize(args.End - GameObjects.Player.ServerPosition) * i * 44).LSIsWall())
                    {
                        Vars.E.CastOnUnit(args.Sender);
                        Vars.Flash.Cast(GameObjects.Player.ServerPosition.LSExtend(args.Sender.ServerPosition, Vars.Flash.Range));
                    }
                }
            }
        }
开发者ID:yashine59fr,项目名称:PortAIO-1,代码行数:37,代码来源:AsunaCondemn.cs


示例2: OnGapCloser

        /// <summary>
        ///     Fired on an incoming gapcloser.
        /// </summary>
        /// <param name="sender">The object.</param>
        /// <param name="args">The <see cref="Events.GapCloserEventArgs" /> instance containing the event data.</param>
        public static void OnGapCloser(object sender, Events.GapCloserEventArgs args)
        {
            if (!args.Sender.IsMelee ||
                Invulnerable.Check(args.Sender, DamageType.Magical))
            {
                return;
            }

            if (Vars.R.IsReady() &&
                args.Sender.IsValidTarget(Vars.R.Range) &&
                args.Sender.IsFacing(GameObjects.Player) &&
                Vars.getCheckBoxItem(Vars.RMenu, "gapcloser"))
            {
                Vars.R.Cast(args.Start);
            }

            if (Vars.W.IsReady() &&
                args.Sender.IsValidTarget(Vars.W.Range) &&
                GameObjects.Player.Distance(args.End) > 500 &&
                Vars.getCheckBoxItem(Vars.WMenu, "gapcloser"))
            {
                Vars.W.Cast(args.End);
                return;
            }
        }
开发者ID:yashine59fr,项目名称:PortAIO,代码行数:30,代码来源:Cassiopeia.cs


示例3: Events_OnGapCloser

        private void Events_OnGapCloser(object sender, Events.GapCloserEventArgs e)
        {
            if (e.Sender.IsAlly) return;

            if (e.IsDirectedToPlayer && HasQ3() && MiscMenu["qGap"].Cast<CheckBox>().CurrentValue)
            {
                Q3.CastIfHitchanceMinimum(e.Sender, HitChance.Medium);
            }
        }
开发者ID:yashine59fr,项目名称:PortAIO,代码行数:9,代码来源:Yasuo.cs


示例4: OnGapCloser

 /// <summary>
 ///     Fired on an incoming gapcloser.
 /// </summary>
 /// <param name="sender">The object.</param>
 /// <param name="args">The <see cref="Events.GapCloserEventArgs" /> instance containing the event data.</param>
 public static void OnGapCloser(object sender, Events.GapCloserEventArgs args)
 {
     if (Vars.E.IsReady() &&
         args.Sender.LSIsValidTarget(Vars.E.Range) &&
         !Invulnerable.Check(args.Sender, DamageType.Magical, false) &&
         Vars.getCheckBoxItem(Vars.EMenu, "gapcloser"))
     {
         Vars.E.Cast(args.End);
     }
 }
开发者ID:yMeliodasNTD,项目名称:PortAIO,代码行数:15,代码来源:MissFortune.cs


示例5: OnInterruptableTarget

 /// <summary>
 ///     Called on interruptable spell.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="args">The <see cref="Events.InterruptableTargetEventArgs" /> instance containing the event data.</param>
 public static void OnInterruptableTarget(object sender, Events.InterruptableTargetEventArgs args)
 {
     if (Vars.R.IsReady() &&
         !Invulnerable.Check(args.Sender) &&
         args.Sender.LSIsValidTarget(Vars.R.Range) &&
         Vars.getCheckBoxItem(Vars.RMenu, "interrupter"))
     {
         Vars.R.Cast(args.Sender.ServerPosition);
     }
 }
开发者ID:yashine59fr,项目名称:PortAIO-1,代码行数:15,代码来源:Ashe.cs


示例6: Events_OnDash

        private static void Events_OnDash(object sender, Events.DashArgs e)
        {
            var hero = sender as AIHeroClient;
            if (hero == null || !hero.IsMe) return;

            startTime = e.StartTick;
            endTime = e.EndTick;
            startPosition = e.StartPos.ToVector3();
            endPosition = e.EndPos.ToVector3();
        }
开发者ID:yashine59fr,项目名称:PortAIO-1,代码行数:10,代码来源:DashManager.cs


示例7: OnInterruptableTarget

 /// <summary>
 ///     Called on interruptable spell.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="args">The <see cref="Events.InterruptableTargetEventArgs" /> instance containing the event data.</param>
 public static void OnInterruptableTarget(object sender, Events.InterruptableTargetEventArgs args)
 {
     if (Vars.W.IsReady() &&
         args.Sender.LSIsValidTarget(Vars.W.Range) &&
         !Invulnerable.Check(args.Sender, DamageType.Physical, false) &&
         Vars.getCheckBoxItem(Vars.WMenu, "interrupter"))
     {
         Vars.W.CastOnUnit(args.Sender);
     }
 }
开发者ID:yMeliodasNTD,项目名称:PortAIO,代码行数:15,代码来源:Pantheon.cs


示例8: OnGapCloser

 /// <summary>
 ///     Fired on an incoming gapcloser.
 /// </summary>
 /// <param name="sender">The object.</param>
 /// <param name="args">The <see cref="Events.GapCloserEventArgs" /> instance containing the event data.</param>
 public static void OnGapCloser(object sender, Events.GapCloserEventArgs args)
 {
     if (Vars.W.IsReady() &&
         args.Sender.IsMelee &&
         args.IsDirectedToPlayer &&
         args.Sender.LSIsValidTarget(Vars.W.Range) &&
         Vars.getCheckBoxItem(Vars.WMenu, "gapcloser"))
     {
         Vars.W.Cast(GameObjects.Player.ServerPosition.LSExtend(args.Sender.ServerPosition, -Vars.W.Range));
     }
 }
开发者ID:yashine59fr,项目名称:PortAIO-1,代码行数:16,代码来源:Tristana.cs


示例9: Events_OnGapCloser

        private static void Events_OnGapCloser(object sender, Events.GapCloserEventArgs e)
        {
            if (SpellToAntiGapcloser == null || e.Sender.IsAlly) return;

            var spellToUse = SpellToAntiGapcloser.OrderByDescending(s => s.Range).FirstOrDefault(s => s.IsReady());

            if (e.IsDirectedToPlayer)
            {
                spellToUse?.CastIfHitchanceMinimum(e.Sender, HitChance.Medium);
            }
        }
开发者ID:yMeliodasNTD,项目名称:PortAIO,代码行数:11,代码来源:AntiGapcloser.cs


示例10: OnGapCloser

 /// <summary>
 ///     Fired on an incoming gapcloser.
 /// </summary>
 /// <param name="sender">The object.</param>
 /// <param name="args">The <see cref="Events.GapCloserEventArgs" /> instance containing the event data.</param>
 public static void OnGapCloser(object sender, Events.GapCloserEventArgs args)
 {
     if (Vars.E.IsReady() &&
         args.Sender.IsMelee &&
         args.Sender.LSIsValidTarget(Vars.E.Range) &&
         args.SkillType == GapcloserType.Targeted &&
         Vars.getCheckBoxItem(Vars.EMenu, "gapcloser"))
     {
         if (args.Target.IsMe)
         {
             Vars.E.Cast(GameObjects.Player.ServerPosition.LSExtend(args.Sender.ServerPosition, -475f));
         }
     }
 }
开发者ID:yashine59fr,项目名称:PortAIO-1,代码行数:19,代码来源:Lucian.cs


示例11: OnGapCloser

 /// <summary>
 ///     Fired on an incoming gapcloser.
 /// </summary>
 /// <param name="sender">The object.</param>
 /// <param name="args">The <see cref="Events.GapCloserEventArgs" /> instance containing the event data.</param>
 public static void OnGapCloser(object sender, Events.GapCloserEventArgs args)
 {
     if (Vars.R.IsReady() &&
         args.Sender.IsMelee &&
         args.Sender.IsValidTarget(Vars.R.Range) &&
         args.SkillType == LeagueSharp.Data.Enumerations.GapcloserType.Targeted &&
         Vars.getCheckBoxItem(Vars.RMenu, "gapcloser"))
     {
         if (args.Target.IsMe)
         {
             Vars.R.Cast(args.Sender.ServerPosition);
         }
     }
 }
开发者ID:yashine59fr,项目名称:PortAIO-1,代码行数:19,代码来源:Ashe.cs


示例12: OnGapCloser

        /// <summary>
        ///     Fired on an incoming gapcloser.
        /// </summary>
        /// <param name="sender">The object.</param>
        /// <param name="args">The <see cref="Events.GapCloserEventArgs" /> instance containing the event data.</param>
        public static void OnGapCloser(object sender, Events.GapCloserEventArgs args)
        {
            if (Vars.E.IsReady() &&
                GameObjects.Player.Distance(args.End) < 750 &&
                Vars.getCheckBoxItem(Vars.EMenu, "gapcloser"))
            {
                if (Vars.R.IsReady() &&
                    Vars.getCheckBoxItem(Vars.RMenu, "empe") &&
                    GameObjects.AllyHeroes.Count(a => a.IsValidTarget(600f, false)) >= 2)
                {
                    Vars.R.Cast();
                }

                Vars.E.Cast();
            }
        }
开发者ID:yashine59fr,项目名称:PortAIO,代码行数:21,代码来源:Karma.cs


示例13: OnGapCloser

        /// <summary>
        ///     Fired on an incoming gapcloser.
        /// </summary>
        /// <param name="sender">The object.</param>
        /// <param name="args">The <see cref="Events.GapCloserEventArgs" /> instance containing the event data.</param>
        public static void OnGapCloser(object sender, Events.GapCloserEventArgs args)
        {
            if (GameObjects.Player.HealthPercent <=
                    Vars.getSliderItem(Vars.QMenu, "shield") &&
                Vars.getSliderItem(Vars.QMenu, "shield") != 0)
            {
                return;
            }

            if (Vars.W.IsReady() &&
            args.Sender.IsValidTarget(Vars.W.Range) &&
            !Invulnerable.Check(args.Sender, DamageType.Magical, false) &&
            Vars.getCheckBoxItem(Vars.WMenu, "gapcloser"))
            {
                Vars.W.CastOnUnit(args.Sender);
            }
        }
开发者ID:yMeliodasNTD,项目名称:PortAIO,代码行数:22,代码来源:Ryze.cs


示例14: OnGapCloser

        /// <summary>
        ///     Fired on an incoming gapcloser.
        /// </summary>
        /// <param name="sender">The object.</param>
        /// <param name="args">The <see cref="Events.GapCloserEventArgs" /> instance containing the event data.</param>
        public static void OnGapCloser(object sender, Events.GapCloserEventArgs args)
        {
            if (Vars.Q.IsReady() &&
                args.IsDirectedToPlayer &&
                !Invulnerable.Check(args.Sender) &&
                args.Sender.LSIsValidTarget(Vars.Q.Range) &&
                Vars.getCheckBoxItem(Vars.QMenu, "gapcloser"))
            {
                Vars.Q.Cast(args.End);
            }

            if (Vars.E.IsReady() &&
                !Invulnerable.Check(args.Sender) &&
                args.Sender.LSIsValidTarget(Vars.E.Range) &&
                Vars.getCheckBoxItem(Vars.EMenu, "gapcloser"))
            {
                Vars.E.Cast(args.End);
            }
        }
开发者ID:yashine59fr,项目名称:PortAIO,代码行数:24,代码来源:KogMaw.cs


示例15: OnInterruptableTarget

        /// <summary>
        /// Called when an interruptable target is in range.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="Events.InterruptableTargetEventArgs"/> instance containing the event data.</param>
        private void OnInterruptableTarget(object sender, Events.InterruptableTargetEventArgs e)
        {
            if (e.DangerLevel < DangerLevel.High || !e.Sender.IsValidTarget()
                || !this.GetSpells()[SpellSlot.Q].IsReady()
                || !AIOVariables.AssemblyMenu["sdkaio.janna.misc"]["QInterrupter"].GetValue<MenuBool>().Value)
            {
                return;
            }

            var unit = e.Sender;
            if (unit.IsValidTarget(this.GetSpells()[SpellSlot.Q].Range))
            {
                var qPrediction = this.GetSpells()[SpellSlot.Q].GetPrediction(unit);
                if (qPrediction.Hitchance > HitChance.Low)
                {
                    this.GetSpells()[SpellSlot.Q].Cast(qPrediction.CastPosition);
                    this.GetSpells()[SpellSlot.Q].Cast();
                }
            }
        }
开发者ID:DZ191,项目名称:LeagueSharp,代码行数:25,代码来源:Janna.cs


示例16: OnGapCloser

        /// <summary>
        ///     Fired on an incoming gapcloser.
        /// </summary>
        /// <param name="sender">The object.</param>
        /// <param name="args">The <see cref="Events.GapCloserEventArgs" /> instance containing the event data.</param>
        public static void OnGapCloser(object sender, Events.GapCloserEventArgs args)
        {
            if (Vars.E.IsReady() &&
                args.IsDirectedToPlayer &&
                args.Sender.LSIsValidTarget(Vars.E.Range) &&
                !Invulnerable.Check(args.Sender, DamageType.Magical, false) &&
                Vars.getCheckBoxItem(Vars.EMenu, "gapcloser"))
            {
                if (!Vars.E.GetPrediction(args.Sender).CollisionObjects.Any())
                {
                    Vars.E.Cast(args.Sender.ServerPosition);
                    return;
                }
            }

            if (Vars.W.IsReady() &&
                args.Sender.IsValidTarget(Vars.W.Range) &&
                !Invulnerable.Check(args.Sender, DamageType.Magical, false) &&
                Vars.getCheckBoxItem(Vars.WMenu, "gapcloser"))
            {
                Vars.W.Cast(args.End);
            }
        }
开发者ID:yashine59fr,项目名称:PortAIO,代码行数:28,代码来源:Caitlyn.cs


示例17: OnInterruptableTarget

        /// <summary>
        ///     Called on interruptable spell.
        /// </summary>
        /// <param name="sender">The object.</param>
        /// <param name="args">The <see cref="Events.InterruptableTargetEventArgs" /> instance containing the event data.</param>
        public static void OnInterruptableTarget(object sender, Events.InterruptableTargetEventArgs args)
        {
            if (Invulnerable.Check(args.Sender, DamageType.Magical, false))
            {
                return;
            }

            if (Vars.E.IsReady() &&
                args.Sender.IsValidTarget(Vars.E.Range) &&
                Vars.getCheckBoxItem(Vars.EMenu, "interrupter"))
            {
                if (!Vars.E.GetPrediction(args.Sender).CollisionObjects.Any())
                {
                    Vars.E.Cast(Vars.E.GetPrediction(args.Sender).UnitPosition);
                    return;
                }
            }

            if (Vars.W.IsReady() &&
                args.Sender.IsValidTarget(Vars.W.Range) &&
                Vars.getCheckBoxItem(Vars.WMenu, "interrupter"))
            {
                Vars.W.Cast(Vars.W.GetPrediction(args.Sender).CastPosition);
            }
        }
开发者ID:yashine59fr,项目名称:PortAIO,代码行数:30,代码来源:Caitlyn.cs


示例18: OnInterruptableTarget

 private void OnInterruptableTarget(object sender, Events.InterruptableTargetEventArgs args)
 {
     if (EInterrupt && args.Sender.Distance(ObjectManager.Player) < 750)
     {
         var pred = E.GetPrediction(args.Sender);
         if (!pred.CollisionObjects.Any())
         {
             E.Cast(args.Sender);
         }
     }
 }
开发者ID:cttbot,项目名称:LeagueSharp,代码行数:11,代码来源:Xerath.cs


示例19: OnInterruptableTarget

 private void OnInterruptableTarget(object sender, Events.InterruptableTargetEventArgs args)
 {
     if (args.Sender.Distance(ObjectManager.Player) < 800)
     {
         E.Cast(args.Sender);
     }
 }
开发者ID:yashine59fr,项目名称:PortAIO-1,代码行数:7,代码来源:Soraka.cs


示例20: OnGapCloser

 private void OnGapCloser(object sender, Events.GapCloserEventArgs args)
 {
     if (args.Target != null && args.Target.Distance(ObjectManager.Player) < 850)
     {
         var hero = args.Target as AIHeroClient;
         if (hero != null && hero.IsHPBarRendered)
         {
             E.Cast(hero.ServerPosition.Randomize(-15, 15));
             return;
         }
         E.Cast(args.Target.Position.Randomize(-15, 15));
     }
     if (args.End.Distance(ObjectManager.Player.Position) < 850)
     {
         if (args.End.Distance(ObjectManager.Player.Position) < 450)
         {
             E.Cast(ObjectManager.Player.ServerPosition.Randomize(-15, 15));
         }
         else
         {
             var gcTarget = GameObjects.AllyHeroes.FirstOrDefault(ally => ally.Position.Distance(args.End) < 450);
             if (gcTarget != null)
             {
                 E.Cast(gcTarget.ServerPosition.Randomize(-15, 15));
             }
         }
     }
 }
开发者ID:yashine59fr,项目名称:PortAIO-1,代码行数:28,代码来源:Soraka.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# TransferObjects.Card类代码示例发布时间:2022-05-26
下一篇:
C# Common.Utility类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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