feat(escape): sunete game over/victorie + cirese in loc de stelute
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -202,12 +202,11 @@ html, body {
|
||||
.stars { display: flex; gap: 0.8vmin; }
|
||||
.star {
|
||||
font-size: clamp(22px, 3vmin, 36px);
|
||||
color: var(--star-locked);
|
||||
transition: color 0.5s, transform 0.5s, filter 0.5s;
|
||||
filter: grayscale(1) opacity(0.4);
|
||||
transition: filter 0.5s, transform 0.5s;
|
||||
}
|
||||
.star.solved {
|
||||
color: var(--star-gold);
|
||||
filter: drop-shadow(0 0 6px rgba(241,196,15,0.6));
|
||||
filter: grayscale(0) opacity(1) drop-shadow(0 0 6px rgba(220,50,50,0.5));
|
||||
animation: starPop 0.8s ease-out;
|
||||
}
|
||||
@keyframes starPop {
|
||||
@@ -782,7 +781,7 @@ html, body {
|
||||
for (let i = 0; i < PROBLEMS.length; i++) {
|
||||
const s = document.createElement("span");
|
||||
s.className = "star";
|
||||
s.textContent = "★";
|
||||
s.textContent = "🍒";
|
||||
s.dataset.idx = i;
|
||||
starsEl.appendChild(s);
|
||||
}
|
||||
@@ -994,7 +993,15 @@ html, body {
|
||||
// ============================================================
|
||||
// GAME OVER
|
||||
// ============================================================
|
||||
function sfxGameOver() {
|
||||
const notes = [440, 370, 311, 261];
|
||||
notes.forEach((f, i) => {
|
||||
setTimeout(() => playTone(f, "sine", 0.3, 0.25), i * 200);
|
||||
});
|
||||
}
|
||||
|
||||
function showGameOver() {
|
||||
sfxGameOver();
|
||||
gameOver.classList.add("visible");
|
||||
}
|
||||
|
||||
@@ -1020,8 +1027,16 @@ html, body {
|
||||
// ============================================================
|
||||
// VICTORY
|
||||
// ============================================================
|
||||
function sfxVictory() {
|
||||
const notes = [523, 659, 784, 1047, 784, 1047];
|
||||
notes.forEach((f, i) => {
|
||||
setTimeout(() => playTone(f, "sine", 0.3, 0.3), i * 150);
|
||||
});
|
||||
}
|
||||
|
||||
function showVictory() {
|
||||
vicStars.textContent = "⭐".repeat(PROBLEMS.length);
|
||||
sfxVictory();
|
||||
vicStars.textContent = "🍒".repeat(PROBLEMS.length);
|
||||
vicBonus.textContent = state.hearts > 0 ? "Bonus: " + state.hearts + " ❤️ rămase!" : "";
|
||||
victoryEl.classList.add("visible");
|
||||
startConfetti();
|
||||
|
||||
Reference in New Issue
Block a user