void TakeDamage() { _hearts.playerHealth = _hearts.playerHealth - damage; _hearts.UpdateHealth(); changeAnimationState(PLAYER_HIT); AudioManager.PlaySound("player_hurt"); if (_hearts.playerHealth <= 0) { // player dead SceneManager.LoadScene(SceneManager.GetActiveScene().name); changeAnimationState(PLAYER_DEAD); } }