public IEnumerator PerformAbilityHitDelay(IAbilityCaster source, GameObject target, AbilityEffectContext abilityEffectInput, ChanneledEffect channeledEffect) { //Debug.Log("ChanelledEffect.PerformAbilityEffectDelay()"); float timeRemaining = channeledEffect.effectDelay; while (timeRemaining > 0f) { yield return(null); timeRemaining -= Time.deltaTime; } channeledEffect.PerformAbilityHit(source, target, abilityEffectInput); abilityHitDelayCoroutine = null; }
public void BeginPerformAbilityHitDelay(IAbilityCaster source, GameObject target, AbilityEffectContext abilityEffectInput, ChanneledEffect channeledEffect) { abilityHitDelayCoroutine = StartCoroutine(PerformAbilityHitDelay(source, target, abilityEffectInput, channeledEffect)); }