本文整理汇总了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)));
}
示例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);
}
}
}
示例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));
}
示例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);
}
示例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);
}
}
示例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());
}
示例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;
}
示例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);
}
}
}
示例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();
}
}
示例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;
}
示例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;
}
示例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);
}
}
}
示例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));
}
示例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]);
}
}
示例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;
}