private IEnumerator CastSpellAfterAnimationBuffer(float castAnimationBuffer) { playerAnimController.AnimateSpellCast(); spellcastAudioTriggers.TriggerSpellChannelAudio(); DisableMovementForSpellcast(); yield return(new WaitForSeconds(castAnimationBuffer)); CastSpell(); }
public void AttemptToCastSpell() { if (!SpellCastingModeActive || spellCooldownsLocalCopy[activeSpell] > 0f) { return; } playerAnimController.AnimateSpellCast(); spellcastAudioTriggers.TriggerSpellChannelAudio(); DisableMovementForSpellcast(); StartCoroutine(TimerUtils.WaitAndPerform(SimulationSettings.PlayerCastAnimationBuffer, CastSpell)); }