本文整理匯總了C#中Ability.GetHitDelay方法的典型用法代碼示例。如果您正苦於以下問題:C# Ability.GetHitDelay方法的具體用法?C# Ability.GetHitDelay怎麽用?C# Ability.GetHitDelay使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Ability
的用法示例。
在下文中一共展示了Ability.GetHitDelay方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Cast
public static bool Cast(Ability ability, Unit target, string name)
{
if (name == "pudge_rot" && Utils.SleepCheck("rotToggle"))
{
if (!ability.IsToggled)
{
ability.ToggleAbility();
Utils.Sleep(500, "rotToggle");
return true;
}
return false;
}
if (name == "templar_assassin_psionic_trap")
{
var modifier = target.FindModifier("modifier_templar_assassin_trap_slow");
if (modifier != null && modifier.RemainingTime > ability.GetHitDelay(target, name))
{
return false;
}
if (TemplarAssasinUseTrap(target))
{
return false;
}
var casted = ability.CastSkillShot(target, MyHeroInfo.Position, name);
if (casted)
{
DelayAction.Add(
new DelayActionItem(
(int)ability.GetHitDelay(target, name) * 1000 + 700,
delegate { TemplarAssasinUseTrap(target); },
CancellationToken.None));
}
return casted;
}
return ability.CastStun(
target,
1,
abilityName: name,
soulRing: SoulRing.Check(ability) ? MyAbilities.SoulRing : null);
}
示例2: Killsteal
public static bool Killsteal(Ability ability, Hero target, string name)
{
return AbilityDamage.CalculateDamage(ability, AbilityMain.Me, target) >= target.Health
&& target.CanDie(name)
&& (!target.IsInvul() || Utils.ChainStun(target, ability.GetHitDelay(target), null, true, name));
}
示例3: ChainStun
public static bool ChainStun(Ability ability, Hero target, string name)
{
return Utils.ChainStun(target, ability.GetHitDelay(target), null, true, name);
}
示例4: Cast
public static bool Cast(Hero target, Ability ability)
{
return
target.Spellbook.Spells.Any(x => x.IsInAbilityPhase && x.FindCastPoint() > ability.GetHitDelay(target))
|| (target.IsChanneling() && !target.GetChanneledAbility().Name.Contains("item"));
}