本文整理汇总了C#中UltimateModeType类的典型用法代码示例。如果您正苦于以下问题:C# UltimateModeType类的具体用法?C# UltimateModeType怎么用?C# UltimateModeType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UltimateModeType类属于命名空间,在下文中一共展示了UltimateModeType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: RLogic
private bool RLogic(Obj_AI_Hero target, int min, bool q, bool e, UltimateModeType mode = UltimateModeType.Combo)
{
try
{
var pred = CPrediction.Circle(R, target, HitChance.High, false);
if (pred.TotalHits > 0 &&
UltimateManager.Check(mode, min, pred.Hits, hero => CalcComboDamage(hero, q, e, true)))
{
R.Cast(pred.CastPosition);
return true;
}
return false;
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
return false;
}
开发者ID:47110572,项目名称:LeagueSharp-Dev,代码行数:19,代码来源:Vladimir.cs
示例2: GetDamage
public float GetDamage(Obj_AI_Hero hero, UltimateModeType mode, int hits = 5)
{
if (DamageCalculation != null)
{
try
{
var dmgMultiplicator =
_menu.Item(_menu.Name + ".ultimate.damage-percent" + (hits <= 1 ? "-single" : string.Empty))
.GetValue<Slider>()
.Value / 100;
return DamageCalculation(hero, dmgMultiplicator, mode != UltimateModeType.Flash) * dmgMultiplicator;
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
}
return 0f;
}
开发者ID:Lizzaran,项目名称:LeagueSharp-Standalones,代码行数:19,代码来源:UltimateManager.cs
示例3: CheckSingle
public bool CheckSingle(UltimateModeType mode, Obj_AI_Hero target)
{
try
{
if (_menu == null || target == null || !target.IsValidTarget())
{
return false;
}
if (ShouldSingle(mode))
{
var minHealth = _menu.Item(_menu.Name + ".ultimate.single.min-health").GetValue<Slider>().Value;
if (Spells != null &&
!Spells.Any(
s =>
s.Slot != SpellSlot.R && s.IsReady() && s.IsInRange(target) &&
s.GetDamage(target, 1) > 10 && Math.Abs(s.Speed - float.MaxValue) < 1 ||
s.From.Distance(target.ServerPosition) / s.Speed + s.Delay <= 1.0f))
{
minHealth = 0;
}
if (target.HealthPercent < minHealth)
{
return false;
}
var alliesRange = _menu.Item(_menu.Name + ".ultimate.single.range-allies").GetValue<Slider>().Value;
var alliesMax = _menu.Item(_menu.Name + ".ultimate.single.max-add-allies").GetValue<Slider>().Value;
var enemiesRange = _menu.Item(_menu.Name + ".ultimate.single.range-allies").GetValue<Slider>().Value;
var enemiesMax =
_menu.Item(_menu.Name + ".ultimate.single.max-add-enemies").GetValue<Slider>().Value;
var pos = ObjectManager.Player.Position.Extend(
target.Position, ObjectManager.Player.Distance(target) / 2f);
var aCount =
GameObjects.AllyHeroes.Count(
h => h.IsValid && !h.IsDead && !h.IsMe && h.Distance(pos) <= alliesRange);
var eCount =
GameObjects.EnemyHeroes.Count(
h =>
h.IsValid && !h.IsDead && h.IsVisible && h.NetworkId != target.NetworkId &&
h.Distance(pos) <= enemiesRange);
if (aCount > alliesMax || eCount > enemiesMax)
{
return false;
}
if (DamageCalculation != null)
{
if (GetDamage(target, mode, 1) < target.Health)
{
return false;
}
}
return true;
}
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
return false;
}
开发者ID:Lizzaran,项目名称:LeagueSharp-Standalones,代码行数:66,代码来源:UltimateManager.cs
示例4: IsActive
public bool IsActive(UltimateModeType mode, Obj_AI_Hero hero = null)
{
if (_menu != null)
{
if (mode == UltimateModeType.Combo)
{
return Combo && _menu.Item(_menu.Name + ".ultimate.combo.enabled").GetValue<bool>();
}
if (mode == UltimateModeType.Auto)
{
return Auto && _menu.Item(_menu.Name + ".ultimate.auto.enabled").GetValue<bool>();
}
if (mode == UltimateModeType.Flash)
{
return Flash && Assisted && _menu.Item(_menu.Name + ".ultimate.assisted.enabled").GetValue<bool>() &&
_menu.Item(_menu.Name + ".ultimate.flash.hotkey").GetValue<KeyBind>().Active;
}
if (mode == UltimateModeType.Assisted)
{
return Assisted && _menu.Item(_menu.Name + ".ultimate.assisted.enabled").GetValue<bool>() &&
_menu.Item(_menu.Name + ".ultimate.assisted.hotkey").GetValue<KeyBind>().Active;
}
if (mode == UltimateModeType.Interrupt)
{
return Auto && Interrupt && hero != null &&
_menu.Item(_menu.Name + ".ultimate.auto.enabled").GetValue<bool>() &&
HeroListManager.Check("ultimate-interrupt", hero);
}
if (mode == UltimateModeType.Gapcloser)
{
return Auto && Gapcloser && hero != null &&
_menu.Item(_menu.Name + ".ultimate.auto.enabled").GetValue<bool>() &&
HeroListManager.Check("ultimate-gapcloser", hero);
}
}
return false;
}
开发者ID:Lizzaran,项目名称:LeagueSharp-Standalones,代码行数:37,代码来源:UltimateManager.cs
示例5: ShouldMove
public bool ShouldMove(UltimateModeType mode)
{
if (_menu != null)
{
var enabled = _menu.Item(_menu.Name + ".ultimate." + GetModeString(mode, true) + ".move-cursor");
return enabled != null && enabled.GetValue<bool>();
}
return false;
}
开发者ID:Lizzaran,项目名称:LeagueSharp-Standalones,代码行数:9,代码来源:UltimateManager.cs
示例6: RLogicSingle
private void RLogicSingle(UltimateModeType mode, HitChance hitChance, bool face = true)
{
try
{
if (Ultimate.ShouldSingle(mode))
{
foreach (var target in
Targets.Where(
t => (!face || t.IsFacing(Player)) && R.CanCast(t) && Ultimate.CheckSingle(mode, t)))
{
var pred = R.GetPrediction(target, true);
if (pred.Hitchance >= hitChance)
{
R.Cast(pred.CastPosition);
break;
}
}
}
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
}
开发者ID:julianrolandi,项目名称:LeagueSharp-Dev,代码行数:24,代码来源:Cassiopeia.cs
示例7: RLogicSingle
private void RLogicSingle(UltimateModeType mode, HitChance hitChance)
{
try
{
if (Q.IsCharging || !_ultimate.ShouldSingle(mode))
{
return;
}
foreach (var t in GameObjects.EnemyHeroes.Where(t => _ultimate.CheckSingle(mode, t)))
{
var pred = R.GetPrediction(t);
if (pred.Hitchance >= hitChance)
{
R.Cast(pred.CastPosition);
break;
}
}
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
}
开发者ID:jayblah,项目名称:Lizzaran,代码行数:23,代码来源:Varus.cs
示例8: RLogicSingle
private void RLogicSingle(UltimateModeType mode)
{
try
{
if (Ultimate.ShouldSingle(mode))
{
foreach (var target in GameObjects.EnemyHeroes.Where(t => Ultimate.CheckSingle(mode, t)))
{
var hits = GetRHits(target);
if (hits.Item1 > 0)
{
R.Cast(hits.Item3);
break;
}
}
}
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
}
开发者ID:yahya672,项目名称:LeagueSharp-Standalones,代码行数:22,代码来源:Graves.cs
示例9: CheckSingle
public bool CheckSingle(UltimateModeType mode, Obj_AI_Hero target)
{
try
{
var modeString = GetModeString(mode);
if (_menu == null || target == null || !target.IsValidTarget())
{
return false;
}
if (ShouldSingle(mode))
{
var minHealth = _menu.Item(_menu.Name + ".ultimate.single.min-health").GetValue<Slider>().Value;
if (target.HealthPercent < minHealth)
{
return false;
}
var alliesMax = _menu.Item(_menu.Name + ".ultimate.single.max-allies").GetValue<Slider>().Value;
var enemiesMax = _menu.Item(_menu.Name + ".ultimate.single.max-enemies").GetValue<Slider>().Value;
var pos = ObjectManager.Player.Position.Extend(
target.Position, ObjectManager.Player.Distance(target) / 2f);
var aCount =
GameObjects.AllyHeroes.Count(h => h.IsValid && !h.IsMe && !h.IsDead && h.Distance(pos) <= 1750);
var eCount =
GameObjects.EnemyHeroes.Count(
h => h.IsValid && !h.IsDead && h.IsVisible && h.Distance(pos) <= 1750);
if (aCount > alliesMax || eCount > enemiesMax)
{
return false;
}
if (DamageCalculation != null &&
_menu.Item(_menu.Name + ".ultimate." + modeString + ".damage-check").GetValue<bool>())
{
if (GetDamage(target) < target.Health)
{
return false;
}
}
return true;
}
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
return false;
}
开发者ID:zombiesing,项目名称:LeagueSharp-Standalones,代码行数:53,代码来源:UltimateManager.cs
示例10: RLogicSingle
private bool RLogicSingle(UltimateModeType mode, bool simulated = false)
{
try
{
if (!R.Instance.Name.Equals("ViktorChaosStorm", StringComparison.OrdinalIgnoreCase) ||
!_ultimate.ShouldSingle(mode))
{
return false;
}
foreach (var target in GameObjects.EnemyHeroes.Where(t => _ultimate.CheckSingle(mode, t)))
{
var pred = CPrediction.Circle(R, target, HitChance.High, false);
if (pred.TotalHits > 0)
{
if (!simulated)
{
R.Cast(pred.CastPosition);
if (Orbwalking.InAutoAttackRange(target))
{
Orbwalker.ForceTarget(target);
}
}
return true;
}
}
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
return false;
}
开发者ID:654955321,项目名称:HY_Recommend,代码行数:33,代码来源:Viktor.cs
示例11: RLogic
private bool RLogic(UltimateModeType mode, Obj_AI_Hero target)
{
try
{
if (Ultimate.IsActive(mode))
{
var hits = GetRHits(target);
if (Ultimate.Check(mode, hits.Item2))
{
R.Cast(hits.Item3);
return true;
}
}
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
return false;
}
开发者ID:yahya672,项目名称:LeagueSharp-Standalones,代码行数:20,代码来源:Graves.cs
示例12: RLogic
private bool RLogic(int min, bool q, bool w, bool e, UltimateModeType mode = UltimateModeType.Combo)
{
try
{
var hits = GetHits(R);
if (UltimateManager.Check(mode, min, hits.Item2, hero => CalcComboDamage(hero, q, w, e, true)))
{
R.Cast(Player.Position);
return true;
}
return false;
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
return false;
}
开发者ID:choisamg,项目名称:LeagueSharp-Dev,代码行数:18,代码来源:Orianna.cs
示例13: RLogic
private bool RLogic(UltimateModeType mode, Obj_AI_Hero target, bool simulated = false)
{
try
{
if (!R.Instance.Name.Equals("ViktorChaosStorm", StringComparison.OrdinalIgnoreCase) ||
!Ultimate.IsActive(mode))
{
return false;
}
var pred = CPrediction.Circle(R, target, HitChance.High, false);
if (pred.TotalHits > 0 && Ultimate.Check(mode, pred.Hits))
{
if (!simulated)
{
R.Cast(pred.CastPosition);
if (Orbwalking.InAutoAttackRange(target))
{
Orbwalker.ForceTarget(target);
}
}
return true;
}
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
return false;
}
开发者ID:julianrolandi,项目名称:LeagueSharp-Dev,代码行数:29,代码来源:Viktor.cs
示例14: RLogic
private bool RLogic(Obj_AI_Hero target,
HitChance hitChance,
int min,
bool q,
bool e,
UltimateModeType mode = UltimateModeType.Combo)
{
try
{
if (Q.IsCharging || target == null)
{
return false;
}
var pred = R.GetPrediction(target);
if (pred.Hitchance >= hitChance)
{
var hits = GameObjects.EnemyHeroes.Where(x => x.Distance(target) <= _rSpreadRadius).ToList();
if (UltimateManager.Check(mode, min, hits, hero => CalcComboDamage(hero, q, e, true)))
{
R.Cast(pred.CastPosition);
return true;
}
}
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
return false;
}
开发者ID:47110572,项目名称:LeagueSharp-Dev,代码行数:30,代码来源:Varus.cs
示例15: RLogicSingle
private void RLogicSingle(UltimateModeType mode)
{
try
{
if (_ultimate.ShouldSingle(mode))
{
foreach (var target in GameObjects.EnemyHeroes.Where(t => _ultimate.CheckSingle(mode, t)))
{
var pred = CPrediction.Circle(R, target, HitChance.High, false);
if (pred.TotalHits > 0)
{
R.Cast(pred.CastPosition);
break;
}
}
}
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
}
开发者ID:juan2202,项目名称:LeagueSharp-Standalones,代码行数:22,代码来源:Vladimir.cs
示例16: GetModeString
private string GetModeString(UltimateModeType mode)
{
if (mode == UltimateModeType.Flash)
{
mode = UltimateModeType.Assisted;
}
return mode.ToString().ToLower();
}
开发者ID:zombiesing,项目名称:LeagueSharp-Standalones,代码行数:8,代码来源:UltimateManager.cs
示例17: RLogic
private bool RLogic(UltimateModeType mode, HitChance hitChance)
{
try
{
if (Ultimate.IsActive(mode))
{
var maxHits = GetMaxRHits(hitChance);
if (maxHits.Item1.Count > 0 && !maxHits.Item2.Equals(Vector3.Zero))
{
if (Ultimate.Check(mode, maxHits.Item1))
{
R.Cast(maxHits.Item2);
return true;
}
}
}
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
return false;
}
开发者ID:julianrolandi,项目名称:LeagueSharp-Dev,代码行数:23,代码来源:Cassiopeia.cs
示例18: RLogic
private bool RLogic(HitChance hitChance,
int min,
bool q,
bool w,
bool e,
UltimateModeType mode = UltimateModeType.Combo)
{
try
{
foreach (var target in Targets.Where(t => R.CanCast(t)))
{
var pred = R.GetPrediction(target, true);
if (pred.Hitchance >= hitChance)
{
var hits = GameObjects.EnemyHeroes.Where(enemy => R.WillHit(enemy, pred.CastPosition)).ToList();
if (UltimateManager.Check(mode, min, hits, hero => CalcComboDamage(hero, q, w, e, true)))
{
R.Cast(pred.CastPosition);
return true;
}
}
}
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
return false;
}
开发者ID:47110572,项目名称:LeagueSharp-Dev,代码行数:29,代码来源:Cassiopeia.cs
示例19: RLogic
private bool RLogic(UltimateModeType mode, HitChance hitChance, Obj_AI_Hero target)
{
try
{
if (Q.IsCharging || target == null || !_ultimate.IsActive(mode))
{
return false;
}
var pred = R.GetPrediction(target);
if (pred.Hitchance >= hitChance)
{
var hits = GameObjects.EnemyHeroes.Where(x => x.Distance(target) <= _rSpreadRadius).ToList();
if (_ultimate.Check(mode, hits))
{
R.Cast(pred.CastPosition);
return true;
}
}
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
return false;
}
开发者ID:jayblah,项目名称:Lizzaran,代码行数:25,代码来源:Varus.cs
示例20: RLogic
private bool RLogic(UltimateModeType mode, HitChance hitChance, Obj_AI_Hero target)
{
try
{
if (target == null || !Ultimate.IsActive(mode))
{
return false;
}
var pred = CPrediction.Circle(R, target, hitChance);
if (pred.TotalHits > 0)
{
if (Ultimate.Check(mode, pred.Hits))
{
_lastRCast = Game.Time;
_lastRPosition = pred.CastPosition;
R.Cast(pred.CastPosition);
return true;
}
}
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
return false;
}
开发者ID:Lizzaran,项目名称:LeagueSharp-Standalones,代码行数:26,代码来源:MissFortune.cs
注:本文中的UltimateModeType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论