public void TakeAHeart() { int lifeCount = 3; for (int i = 2; i >= 0; i--) { if (lifes[i]) { lifes[i] = false; lifeCount = i; AudioManager.GetInstance().Play("sfx-dano"); break; } } if (!lifes[0]) { AudioManager.GetInstance().Play("bgm-morte"); DeathMenu.GetInstance().Open(); return; } LevelCompletedMenu.GetInstance().SetLifeText(lifeCount); FindObjectOfType <LifeManager>().SetHearts(lifes); }