private void OnEnable() { healthPlayer = GetComponent <HealthPlayer>(); Debug.Log("vidas restantes " + healthPlayer.LivesRemaining()); Debug.Log(healthPlayer.maxHealth); for (int i = 0; i < lives; i++) { if (healthPlayer.LivesRemaining() < healthPlayer.maxHealth) { healthPlayer.AddLife(); } } Debug.Log("vidas tras curarte" + healthPlayer.LivesRemaining()); DisableSandwich(); }