Ejemplo n.º 1
0
    IEnumerator TakeDamageRoutine(float stunTime)
    {
        _move.CanMove = false;
        _anims.HitAnimation();
        yield return(new WaitForSeconds(stunTime));

        if (_currentHealth > 0)
        {
            _move.CanMove = true; //Enemy can only walk again if he has more than 0 hp / isn't dead
        }
    }