本文整理匯總了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);
}
}