本文整理汇总了C#中Ability.GetCooldown方法的典型用法代码示例。如果您正苦于以下问题:C# Ability.GetCooldown方法的具体用法?C# Ability.GetCooldown怎么用?C# Ability.GetCooldown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ability
的用法示例。
在下文中一共展示了Ability.GetCooldown方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Game_OnUpdate
//.........这里部分代码省略.........
if (_creepTarget != null && _creepTarget.IsValid && _creepTarget.IsVisible && _creepTarget.IsAlive)
{
var time = _me.IsRanged == false
? _aPoint * 2 / 1000 + _me.GetTurnTime(_creepTarget.Position)
: _aPoint * 2 / 1000 + _me.GetTurnTime(_creepTarget.Position) + _me.Distance2D(_creepTarget) / GetProjectileSpeed(_me);
var time2 = _me.IsRanged == false
? _aPoint / 1000
: _aPoint / 1000 + _me.Distance2D(_creepTarget) / GetProjectileSpeed(_me);
var getDamage = GetDamageOnUnit(_creepTarget, Healthpredict(_creepTarget, time));
var getDamage2 = GetDamageOnUnit(_creepTarget, Healthpredict(_creepTarget, time2));
if (_creepTarget.Distance2D(_me) <= _attackRange && _creepTarget.Health < getDamage * 2)
{
if (_creepTarget.Health < getDamage ||
(_creepTarget.Health < getDamage && _creepTarget.Team == _me.Team &&
Menu.Item("denied").GetValue<bool>()))
{
if (!_me.IsAttacking())
_me.Attack(_creepTarget);
}
else if (_creepTarget.Health < getDamage * 2 && _creepTarget.Health >= getDamage &&
_creepTarget.Team != _me.Team && Utils.SleepCheck("stop"))
{
_me.Hold();
_me.Attack(_creepTarget);
Utils.Sleep(_aPoint + Game.Ping, "stop");
}
}
else //if (_me.Distance2D(_creepTarget) >= _attackRange && Utils.SleepCheck("walk"))
{
_target = _me.BestAATarget();
if (_target != null)
{
if (Menu.Item("harassheroes").GetValue<bool>() && _target.Distance2D(_me) <= _attackRange)
_target = _me.BestAATarget();
else
_target = null;
if (Menu.Item("usespell").GetValue<bool>() && Utils.SleepCheck("cooldown") && _target != null)
{
_q.UseAbility(_target);
Utils.Sleep(_q.GetCastPoint(_q.Level) * 300 + 50 + Game.Ping, "cast");
Utils.Sleep(_q.GetCooldown(_q.Level) * 300 + 50 + Game.Ping, "cooldown");
}
else
{
Orbwalking.Orbwalk(_target);
// return;
}
}
//Orbwalking.Orbwalk(_target);
}
}
else
{
_target = _me.BestAATarget();
if (_target != null)
{
if (Menu.Item("harassheroes").GetValue<bool>() && _target.Distance2D(_me) <= _attackRange)
_target = _me.BestAATarget();
else
_target = null;
}
Orbwalking.Orbwalk(_target);
}
}
else if (Game.IsKeyDown(Menu.Item("farmKey").GetValue<KeyBind>().Key) && Utils.SleepCheck("cast"))
{
Autoattack(0, 0);
_creepTarget = GetLowestHpCreep(_me, null);
_creepTarget = KillableCreep(true, _creepTarget, ref wait);
if (_creepTarget != null && _creepTarget.IsValid && _creepTarget.IsVisible && _creepTarget.IsAlive)
{
if (Menu.Item("usespell").GetValue<bool>() && Utils.SleepCheck("cooldown"))
SpellCast();
}
Orbwalking.Orbwalk(_creepTarget);
}
else if (Game.IsKeyDown(Menu.Item("combatkey").GetValue<KeyBind>().Key))
{
Orbwalking.Orbwalk(_target, attackmodifiers: true);
}
else if (Game.IsKeyDown(Menu.Item("kitekey").GetValue<KeyBind>().Key))
{
Orbwalking.Orbwalk(
_target,
attackmodifiers: true,
bonusWindupMs: Menu.Item("bonusWindup").GetValue<Slider>().Value);
}
else
{
Autoattack(_autoAttack, _autoAttackAfterSpell);
}
}