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; }
|
.stars { display: flex; gap: 0.8vmin; }
|
||||||
.star {
|
.star {
|
||||||
font-size: clamp(22px, 3vmin, 36px);
|
font-size: clamp(22px, 3vmin, 36px);
|
||||||
color: var(--star-locked);
|
filter: grayscale(1) opacity(0.4);
|
||||||
transition: color 0.5s, transform 0.5s, filter 0.5s;
|
transition: filter 0.5s, transform 0.5s;
|
||||||
}
|
}
|
||||||
.star.solved {
|
.star.solved {
|
||||||
color: var(--star-gold);
|
filter: grayscale(0) opacity(1) drop-shadow(0 0 6px rgba(220,50,50,0.5));
|
||||||
filter: drop-shadow(0 0 6px rgba(241,196,15,0.6));
|
|
||||||
animation: starPop 0.8s ease-out;
|
animation: starPop 0.8s ease-out;
|
||||||
}
|
}
|
||||||
@keyframes starPop {
|
@keyframes starPop {
|
||||||
@@ -782,7 +781,7 @@ html, body {
|
|||||||
for (let i = 0; i < PROBLEMS.length; i++) {
|
for (let i = 0; i < PROBLEMS.length; i++) {
|
||||||
const s = document.createElement("span");
|
const s = document.createElement("span");
|
||||||
s.className = "star";
|
s.className = "star";
|
||||||
s.textContent = "★";
|
s.textContent = "🍒";
|
||||||
s.dataset.idx = i;
|
s.dataset.idx = i;
|
||||||
starsEl.appendChild(s);
|
starsEl.appendChild(s);
|
||||||
}
|
}
|
||||||
@@ -994,7 +993,15 @@ html, body {
|
|||||||
// ============================================================
|
// ============================================================
|
||||||
// GAME OVER
|
// 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() {
|
function showGameOver() {
|
||||||
|
sfxGameOver();
|
||||||
gameOver.classList.add("visible");
|
gameOver.classList.add("visible");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1020,8 +1027,16 @@ html, body {
|
|||||||
// ============================================================
|
// ============================================================
|
||||||
// VICTORY
|
// 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() {
|
function showVictory() {
|
||||||
vicStars.textContent = "⭐".repeat(PROBLEMS.length);
|
sfxVictory();
|
||||||
|
vicStars.textContent = "🍒".repeat(PROBLEMS.length);
|
||||||
vicBonus.textContent = state.hearts > 0 ? "Bonus: " + state.hearts + " ❤️ rămase!" : "";
|
vicBonus.textContent = state.hearts > 0 ? "Bonus: " + state.hearts + " ❤️ rămase!" : "";
|
||||||
victoryEl.classList.add("visible");
|
victoryEl.classList.add("visible");
|
||||||
startConfetti();
|
startConfetti();
|
||||||
|
|||||||
Reference in New Issue
Block a user