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


C# Obj_AI_Hero.HealthPercentage方法代码示例

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


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

示例1: ProtectorOnTargetedProtection

        private void ProtectorOnTargetedProtection(Obj_AI_Base caster, Obj_AI_Hero target, SpellData spell)
        {
            try
            {
                if (!ConfigValue<bool>("Misc.Shield.Target"))
                {
                    return;
                }

                if (Orbwalking.IsAutoAttack(spell.Name) &&
                    target.HealthPercentage() > ConfigValue<Slider>("Misc.Shield.Health").Value)
                {
                    return;
                }

                if (spell.MissileSpeed > 2000 || spell.MissileSpeed == 0)
                {
                    return;
                }

                // TODO: blacklist FiddleQ, FioraQ/R, LeonaE, VladQ, ZileanQ

                if (target.IsMe && E.IsReady())
                {
                    CastShield(caster.Position);
                }

                if (!target.IsMe && W.IsReady() && W.IsInRange(target) && (IsShieldActive || E.IsReady()))
                {
                    var jumpTime = (Player.Distance(target) * 1000 / W.Instance.SData.MissileSpeed) +
                                   (W.Instance.SData.SpellCastTime * 1000);
                    var missileTime = caster.Distance(target) * 1000 / spell.MissileSpeed;

                    if (jumpTime > missileTime)
                    {
                        Console.WriteLine("Abort Jump - Missile too Fast: {0} {1}", jumpTime, missileTime);
                        return;
                    }

                    W.CastOnUnit(target);
                    Utility.DelayAction.Add((int) jumpTime, () => CastShield(caster.Position));
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
开发者ID:Hyunabstar,项目名称:Experimental,代码行数:48,代码来源:Braum.cs

示例2: UseItems

        private static void UseItems(Obj_AI_Hero tar)
        {
            var ownH = GetPerValue(false);
            if ((Menu.Item("BotrkC").GetValue<bool>() && _orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo) &&
                (Menu.Item("OwnHPercBotrk").GetValue<Slider>().Value <= ownH) &&
                ((Menu.Item("EnHPercBotrk").GetValue<Slider>().Value <= tar.HealthPercentage())))
            {
                UseItem(3153, tar);
            }

            if ((Menu.Item("BotrkH").GetValue<bool>() && _orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed) &&
                (Menu.Item("OwnHPercBotrk").GetValue<Slider>().Value <= ownH) &&
                ((Menu.Item("EnHPercBotrk").GetValue<Slider>().Value <= tar.HealthPercentage())))
            {
                UseItem(3153, tar);
            }

            if (Menu.Item("YoumuuC").GetValue<bool>() && _orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
            {
                UseItem(3142);
            }

            if (Menu.Item("YoumuuH").GetValue<bool>() && _orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed)
            {
                UseItem(3142);
            }

            if (Menu.Item("BilgeC").GetValue<bool>() && _orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
            {
                UseItem(3144, tar);
            }

            if (Menu.Item("BilgeH").GetValue<bool>() && _orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed)
            {
                UseItem(3144, tar);
            }
        }
开发者ID:GodLS,项目名称:LSharpWIP,代码行数:37,代码来源:PennyJinx.cs

示例3: CastE

        static void CastE(Obj_AI_Hero enemy)
        {
            if (!E.IsReady() || enemy == null || !enemy.IsValidTarget())
            {
                return;
            }
            bool caught = IsPulling().Item1;
            Obj_AI_Hero CatchedQtarget = IsPulling().Item2;

            if (!caught && qTimer == 0)
            {
                if (Player.Distance(enemy.Position) <= E.Range)
                {
                    if (Player.HealthPercentage() < 20 && enemy.HealthPercentage() > 20)
                    {
                        Push(enemy);
                    }
                    else
                    {
                        Pull(enemy);
                    }
                }
            }

        }
开发者ID:Antr4xSoft,项目名称:LeagueSharp,代码行数:25,代码来源:thresh.cs


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