Exemplo n.º 1
0
        private IEnumerator CastSpellAfterAnimationBuffer(float castAnimationBuffer)
        {
            playerAnimController.AnimateSpellCast();
            spellcastAudioTriggers.TriggerSpellChannelAudio();
            DisableMovementForSpellcast();
            yield return(new WaitForSeconds(castAnimationBuffer));

            CastSpell();
        }
Exemplo n.º 2
0
        public void AttemptToCastSpell()
        {
            if (!SpellCastingModeActive || spellCooldownsLocalCopy[activeSpell] > 0f)
            {
                return;
            }

            playerAnimController.AnimateSpellCast();
            spellcastAudioTriggers.TriggerSpellChannelAudio();
            DisableMovementForSpellcast();

            StartCoroutine(TimerUtils.WaitAndPerform(SimulationSettings.PlayerCastAnimationBuffer, CastSpell));
        }