當前位置: 首頁>>代碼示例>>C#>>正文


C# AIHeroClient.IsFacing方法代碼示例

本文整理匯總了C#中AIHeroClient.IsFacing方法的典型用法代碼示例。如果您正苦於以下問題:C# AIHeroClient.IsFacing方法的具體用法?C# AIHeroClient.IsFacing怎麽用?C# AIHeroClient.IsFacing使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在AIHeroClient的用法示例。


在下文中一共展示了AIHeroClient.IsFacing方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: OnGapcloser

        private static void OnGapcloser(AIHeroClient sender, Gapcloser.GapcloserEventArgs e)
        {
            if (!sender.IsEnemy || !Config.Settings.AntiGapcloser.AntiGap || Player.Instance.IsRecalling()) return;

            foreach (
                var ally in
                    EntityManager.Heroes.Allies.Where(ally => sender.IsFacing(ally) && Q.IsInRange(sender.Position)))
            {
                if (Config.Settings.Humanizer.QCastDelayEnabled)
                {
                    Core.DelayAction(() => { Q.Cast(Q.GetPrediction(sender).CastPosition); },
                        Config.Settings.Humanizer.QRndmDelay
                            ? new Random().Next(250, Config.Settings.Humanizer.QCastDelay)
                            : Config.Settings.Humanizer.QCastDelay);
                }
                else
                {
                    Q.Cast(Q.GetPrediction(sender).CastPosition);
                }
            }
        }
開發者ID:FireBuddy,項目名稱:elobuddy,代碼行數:21,代碼來源:Events.cs

示例2: GapCloser

        private static void GapCloser(AIHeroClient sender, Gapcloser.GapcloserEventArgs e)
        {
            var antigap = MiscMenu["nasus.enable.antigap"].Cast<CheckBox>().CurrentValue;

                if (antigap && W.IsReady() && sender.IsValidTarget(W.Range) && sender.IsFacing(Player))
                    W.Cast(sender);
        }
開發者ID:impressivekayle,項目名稱:Elobuddy-Addons,代碼行數:7,代碼來源:Program.cs

示例3: OnPossibleToInterrupt

 private static void OnPossibleToInterrupt(AIHeroClient unit, InterruptableSpell spell)
 {
     if (Player.IsDead || !getCheckBoxItem(miscMenu, "EQ") ||
         !getCheckBoxItem(miscMenu, unit.ChampionName + "_" + spell.Slot) || !Q.IsReady())
     {
         return;
     }
     if (E.CanCast(unit) && Player.Mana >= Q.Instance.SData.Mana + E.Instance.SData.Mana)
     {
         var predE = E.GetPrediction(unit);
         if (predE.Hitchance >= E.MinHitChance &&
             E.Cast(
                 predE.UnitPosition.LSExtend(Player.ServerPosition, -E.Width/(unit.IsFacing(Player) ? 2 : 1)),
                 getCheckBoxItem(miscMenu, "Packet")) &&
             Q.Cast(predE.UnitPosition, getCheckBoxItem(miscMenu, "Packet")))
         {
             return;
         }
     }
     foreach (var flag in
         Flag.Where(i => Q2.WillHit(unit, i.ServerPosition)))
     {
         Q.Cast(flag.ServerPosition, getCheckBoxItem(miscMenu, "Packet"));
     }
 }
開發者ID:,項目名稱:,代碼行數:25,代碼來源:

示例4: Gapcloser_OnGapcloser

        /// <summary>
        /// Gapcloses whenever possible.
        /// </summary>
        /// <param name="sender">Enemy</param>
        /// <param name="e">The Arguments</param>
        static void Gapcloser_OnGapcloser(AIHeroClient sender, Gapcloser.GapcloserEventArgs e)
        {
            var gapR = InterruptMenu["gapR"].Cast<CheckBox>().CurrentValue;

            if (gapR && sender.IsValidTarget() && sender.IsFacing(PlayerInstance))
            {
                var pred = R.GetPrediction(sender);

                if (pred.HitChance == HitChance.High)
                {
                    R.Cast(sender.Position);
                }
            }
        }
開發者ID:Drenferalis,項目名稱:EloBuddy,代碼行數:19,代碼來源:Program.cs

示例5: OnInterruptableTarget

        /// <summary>
        ///     Called when there is an interruptible target.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="args">The <see cref="Interrupter2.InterruptableTargetEventArgs" /> instance containing the event data.</param>
        private void OnInterruptableTarget(AIHeroClient sender, Interrupter2.InterruptableTargetEventArgs args)
        {
            if (!getCheckBoxItem(miscMenu, "Interrupter") || !sender.IsFacing(this.Player) || !sender.LSIsValidTarget(this.R.Range))
            {
                return;
            }

            this.R.Cast(sender);
        }
開發者ID:yMeliodasNTD,項目名稱:PortAIO,代碼行數:14,代碼來源:EatMyCass.cs

示例6: ECast

        private static void ECast(AIHeroClient target)
        {
            if (!target.IsValidTarget(E.Range) || !E.IsReady()) return;
            var prediction = E.GetPrediction(target);
            var pos = prediction.CastPosition;

            if (pos.Distance(_Player.Position) < E.Range &&
                prediction.HitChance >= HitChance.Medium)
            {
                if (_Player.IsFacing(target) && target.IsFacing(_Player))
                {
                    E.Cast(pos.Extend(_Player.Position, 300).To3D());
                }
                else if (_Player.IsFacing(target) && !target.IsFacing(_Player))
                {
                    E.Cast(pos.Extend(_Player.Position, 150).To3D());
                }
                else if (!_Player.IsFacing(target) && target.IsFacing(_Player))
                {
                    E.Cast(pos.Extend(_Player.Position, 300).To3D());
                }
            }
        }
開發者ID:AnneFrankGotRekt,項目名稱:EloBuddy,代碼行數:23,代碼來源:Brain.cs


注:本文中的AIHeroClient.IsFacing方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。