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


C# Obj_AI_Base.Valid方法代码示例

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


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

示例1: Cast

        /// <summary>
        /// Casts E Logic.
        /// </summary>
        /// <param name="target">The target.</param>
        /// <param name="activeMode">The active mode.</param>
        public override void Cast(Obj_AI_Base target, Orbwalker.ActiveModes activeMode)
        {
            if (!ShouldCast())
            {
                _spellCasted = false;
                return;
            }

            if (_spellCasted)
            {
                if (HitChanceCast(E, target, 70)) _spellCasted = false;
            }
            else if (!target.Valid(E.Range))
            {
                return;
            }

            switch (activeMode)
            {
                case Orbwalker.ActiveModes.Combo:
                    if (HitChanceCast(E, target)) _spellCasted = true;
                    break;
                case Orbwalker.ActiveModes.Harass:
                    if (HitChanceCast(E, target)) _spellCasted = true;
                    break;
            }
        }
开发者ID:mrarticuno,项目名称:EBHQ,代码行数:32,代码来源:ELogic.cs

示例2: Cast

        /// <summary>
        /// Casts Q Logic.
        /// </summary>
        /// <param name="target">The target.</param>
        /// <param name="activeMode">The active mode.</param>
        public override void Cast(Obj_AI_Base target, Orbwalker.ActiveModes activeMode)
        {
            if (!ShouldCast() || !target.Valid(Q.Range)) return;

            switch (activeMode)
            {
                case Orbwalker.ActiveModes.Combo:
                    base.HitChanceCast(Q, target);
                    break;
                case Orbwalker.ActiveModes.Harass:
                    base.HitChanceCast(Q, target);
                    break;
            }
        }
开发者ID:tsubaca,项目名称:EBAddons,代码行数:19,代码来源:QLogic.cs

示例3: Cast

        /// <summary>
        /// Casts R Logic.
        /// </summary>
        /// <param name="target">The target.</param>
        /// <param name="activeMode">The active mode.</param>
        public override void Cast(Obj_AI_Base target, Orbwalker.ActiveModes activeMode)
        {
            if (!ShouldCast() || !target.Valid(R.Range)) return;

            if (Player.Instance.IsInAutoAttackRange(target) && Player.Instance.GetAutoAttackDamage(target, true) > target.Health && Orbwalker.CanAutoAttack)
            {
                return;
            }

            if (Q.IsReady() && Player.Instance.GetSpellDamage(target, SpellSlot.Q) > target.Health && Q.IsInRange(target))
            {
                return;
            }

            if (E.IsReady() && Player.Instance.GetSpellDamage(target, SpellSlot.E) > target.Health && E.IsInRange(target))
            {
                return;
            }

            switch (activeMode)
            {
                case Orbwalker.ActiveModes.Combo:
                    if (target.HasBuff("LuxIlluminatingFraulein"))
                    {
                        if (Killable(target, (10 + 8 * Player.Instance.Level)))
                        {
                            if (target.HasBuffOfType(BuffType.Snare))
                                R.Cast(target.Position);
                            else if (target.HasBuffOfType(BuffType.Slow))
                                HitChanceCast(R, target);
                            else
                                R.Cast(Prediction.Position.PredictUnitPosition(target, 500).To3D());
                        }
                    }
                    else
                    {
                        if (Killable(target))
                        {
                            if (target.IsRooted)
                                R.Cast(target.Position);
                            else if (target.HasBuffOfType(BuffType.Slow))
                                HitChanceCast(R, target);
                            else
                                R.Cast(Prediction.Position.PredictUnitPosition(target, 500).To3D());
                        }
                    }
                    break;
            }
        }
开发者ID:mrarticuno,项目名称:EBHQ,代码行数:54,代码来源:RLogic.cs


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