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


C# HitChance类代码示例

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


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

示例1: AddHitChance

 public static MenuItem AddHitChance(this Menu menu, string name, string displayName, HitChance defaultHitChance)
 {
     return
         menu.AddItem(
             new MenuItem(name, displayName).SetValue(
                 new StringList(new[] { "Low", "Medium", "High", "Very High" }, (int) defaultHitChance - 3)));
 }
开发者ID:StopMotionCuber,项目名称:LeagueSharp-1,代码行数:7,代码来源:MenuExtensions.cs

示例2: CastSkillshot

        public void CastSkillshot(Obj_AI_Hero t, Spell s, HitChance hc = HitChance.High)
        {
            if (!s.IsSkillshot)
                return;

            PredictionOutput p = s.GetPrediction(t);

            if (s.Collision)
            {
                for (int i = 0; i < p.CollisionObjects.Count; i++)
                    if (!p.CollisionObjects[i].IsDead && (p.CollisionObjects[i].IsEnemy || p.CollisionObjects[i].IsMinion))
                        return;
            }

            if ((t.HasBuffOfType(BuffType.Slow) && p.Hitchance >= HitChance.High) || p.Hitchance == HitChance.Immobile)
                s.Cast(p.CastPosition);
            else if (t.IsRecalling())
                s.Cast(t.ServerPosition);
            else
            {
                if (s.IsReady())
                {
                    s.SPredictionCast(t, hc);
                }
            }
        }
开发者ID:cak3d,项目名称:LeagueSharp,代码行数:26,代码来源:Nidalee.cs

示例3: Cast

 public override void Cast(Obj_AI_Hero target, bool force = false, HitChance minChance = HitChance.Low)
 {
     if (HasBeenSafeCast() || target == null || target.GetWaypoints().Last().Distance(target) > 50) return;
     var prediction = Spell.GetPrediction(target, true);
     if (prediction.Hitchance < minChance) return;
     SafeCast(() => Spell.Cast(prediction.CastPosition));
 }
开发者ID:jayblah,项目名称:TheNinow,代码行数:7,代码来源:EkkoW.cs

示例4: CastSkillshot

    public void CastSkillshot(string spell, Obj_AI_Base target, HitChance hitChance = HitChance.VeryHigh, bool packet = true, bool aoe = false)
    {
        if (!Spells[spell].IsReady()) return;

        if (target.IsValidTarget(Spells[spell].Range) && Spells[spell].GetPrediction(target).Hitchance >= hitChance)
            Spells[spell].Cast(target, packet, aoe);
    }
开发者ID:CupidL0ve,项目名称:LeagueSharp,代码行数:7,代码来源:SpellManager.cs

示例5: CastBasicSkillShot

        public static void CastBasicSkillShot(Spell spell, float range, TargetSelector.DamageType type, HitChance hitChance, bool towerCheck = false)
        {
            var target = TargetSelector.GetTarget(range, type);

            if (target == null || !spell.IsReady())
                return;

            if (towerCheck && target.UnderTurret(true))
                return;

            spell.UpdateSourcePosition();

            if (spell.Type == SkillshotType.SkillshotCircle)
            {
                var pred = Prediction.GetPrediction(target, spell.Delay);

                if (pred.Hitchance >= hitChance)
                    spell.Cast(pred.CastPosition);
            }
            else
            {
                spell.CastIfHitchanceEquals(target, hitChance); 
            }
           
        }
开发者ID:leenam0910,项目名称:LSharp,代码行数:25,代码来源:SpellCastManager.cs

示例6: CastBasicSkillShot

 public static void CastBasicSkillShot(Spell spell, float range, LeagueSharp.Common.TargetSelector.DamageType type, HitChance hitChance)
 {
     var target = LeagueSharp.Common.TargetSelector.GetTarget(range, type);
     if (target == null || !spell.IsReady())
     return;
     spell.UpdateSourcePosition();
     if (spell.GetPrediction(target).Hitchance >= hitChance)
     spell.Cast(target, packets());
 }
开发者ID:LittleYuiChan,项目名称:LeagueSharp-2,代码行数:9,代码来源:Program.cs

示例7: Spell

        /// <summary>
        ///     Initializes a new instance of the <see cref="Spell" /> class.
        /// </summary>
        /// <param name="spellDataWrapper">
        ///     SpellSlot Wrapper
        /// </param>
        /// <param name="hitChance">
        ///     Minimum Hit Chance
        /// </param>
        public Spell(SpellDataWrapper spellDataWrapper, HitChance hitChance = HitChance.Medium)
        {
            this.Slot = spellDataWrapper.Slot;
            this.Range = spellDataWrapper.Range;
            this.Width = spellDataWrapper.Width;
            this.Speed = spellDataWrapper.Speed;
            this.Delay = spellDataWrapper.Delay;

            this.MinHitChance = hitChance;
        }
开发者ID:47110572,项目名称:CN,代码行数:19,代码来源:Spell.cs

示例8: PierceCombo

 public static void PierceCombo(int collisionObject, HitChance hChance)
 {
     foreach (var enemy in HeroManager.Enemies.Where(hero => hero.IsValidTarget(Program.Q.Range) && hero.IsVisible && !hero.IsDead && !hero.IsZombie))
     {
         if (Program.Q.GetPrediction(enemy).Hitchance >= hChance && Program.Q.GetPrediction(enemy).CollisionObjects.Count == 0)
         {
             Program.Q.Cast(enemy);
         }
     }
 }
开发者ID:Sthephanfelix,项目名称:LeagueSharp-4,代码行数:10,代码来源:Helper.cs

示例9: CastSpell

 public static void CastSpell(Spell spell, Obj_AI_Base target, HitChance hitChance, bool packetCast)
 {
     Obj_AI_Hero Player = ObjectManager.Player;
     if (target.IsValidTarget(spell.Range) && spell.GetPrediction(target).Hitchance >= hitChance)
     {
         spell.Cast(target, packetCast);
         LastCastTime = Environment.TickCount;
         Orbwalking.ResetAutoAttackTimer();
     }
 }
开发者ID:matt184,项目名称:LeagueSharp,代码行数:10,代码来源:SpellManager.cs

示例10: HitChanceCast

        public static bool HitChanceCast(this Spell.Skillshot spell, Obj_AI_Base target, HitChance chance)
        {
            var pred = spell.GetPrediction(target);

            if (pred.HitChance >= chance)
                if (spell.Cast(pred.CastPosition))
                    return true;

            return false;
        }
开发者ID:BEEBEEISADOG,项目名称:EloBuddy-2,代码行数:10,代码来源:SpellsExtensions.cs

示例11: SnipePrediction

        public SnipePrediction(Events.InvisibleEventArgs targetArgs)
        {
            SnipeChance = HitChance.Impossible;
            target = targetArgs.sender;
            invisibleStartTime = targetArgs.StartTime;
            lastRealPath = targetArgs.LastRealPath;

            ultBoundingRadius = Listing.UltSpellDataList[ObjectManager.Player.ChampionName].Width;

            Teleport.OnTeleport += SnipePredictionOnTeleport;
        }
开发者ID:DanThePman,项目名称:HumanziedBaseUlt,代码行数:11,代码来源:SnipePrediction.cs

示例12: Cast

 public static void Cast(this Spell.Skillshot spell, Obj_AI_Base target, HitChance hitChance, bool value = true)
 {
     if (target != null && spell.IsReady() && target.IsKillable(spell.Range))
     {
         var pred = spell.GetPrediction(target);
         if (pred.HitChance >= hitChance || value)
         {
             spell.Cast(pred.CastPosition);
         }
     }
 }
开发者ID:FireBuddy,项目名称:kappa-s-aio,代码行数:11,代码来源:HitChanceManager.cs

示例13: Cast

        public override void Cast(Obj_AI_Hero target, bool force = false, HitChance minChance = HitChance.Low)
        {
            if (target == null) return;
            if (ObjectManager.Player.HasBuff("ekkoattackbuff") && target.Distance(ObjectManager.Player) < 500)
            {
                ObjectManager.Player.IssueOrder(GameObjectOrder.AutoAttack, target);

            }

            if (HasBeenSafeCast() || target.Distance(ObjectManager.Player) < ObjectManager.Player.AttackRange + ObjectManager.Player.BoundingRadius + target.BoundingRadius) return;
            SafeCast(() => Spell.Cast(target.Position));
        }
开发者ID:jayblah,项目名称:TheNinow,代码行数:12,代码来源:EkkoE.cs

示例14: PierceJungleClear

        public static void PierceJungleClear(Spell spell, HitChance hChance)
        {
            var mob = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, Orbwalking.GetRealAutoAttackRange(ObjectManager.Player) + 100, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth);
            if (mob == null || mob.Count == 0)
            {
                return;
            }
            if (Program.Q.GetPrediction(mob[0]).Hitchance >= hChance && Program.Q.GetPrediction(mob[0]).CollisionObjects.Count == 0)
            {
                Program.Q.Cast(mob[0]);
            }

        }
开发者ID:Sthephanfelix,项目名称:LeagueSharp-4,代码行数:13,代码来源:Helper.cs

示例15: CreateHCSlider

 public static Slider CreateHCSlider(string identifier, string displayName, HitChance defaultValue, Menu menu)
 {
     var slider = menu.Add(identifier, new Slider(displayName, (int)defaultValue, 0, 8));
     var hcNames = new[]
     {"Unknown", "Impossible", "Collision", "Low", "AveragePoint", "Medium", "High", "Dashing", "Immobile"};
     slider.DisplayName = hcNames[slider.CurrentValue];
     slider.OnValueChange +=
         delegate (ValueBase<int> sender, ValueBase<int>.ValueChangeArgs changeArgs)
         {
             sender.DisplayName = hcNames[changeArgs.NewValue];
         };
     return slider;
 }
开发者ID:drunkenninja,项目名称:Elobuddy,代码行数:13,代码来源:Util.cs


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