feat(nds): add audio in all menus

This commit is contained in:
2026-02-25 14:52:48 +01:00
parent 4af6de5329
commit 858082e151
45 changed files with 240 additions and 117 deletions

View File

@@ -120,7 +120,7 @@ const handleActivateB = async () => {
onClosed: async (choice) => {
if (choice === "A") {
await animateOutro();
store.closeSubMenu();
store.closeSubMenu(true);
} else {
state.value = "alive";
}
@@ -160,6 +160,7 @@ const handleActivateA = () => {
}
case "waiting": {
atlas.audio.menuConfirmed.play();
spawn();
break;
}
@@ -207,6 +208,8 @@ const eat = () => {
food.copy(randomFoodPos());
score += 1;
atlas.audio.duplicate.play(0.35);
if (score === 40) {
achievements.unlock("snake_score_25");
}
@@ -214,6 +217,7 @@ const eat = () => {
const die = () => {
state.value = "dead";
atlas.audio.invalid.play();
};
const spawn = () => {
@@ -351,6 +355,7 @@ useKeyDown(({ key }) => {
if (newDirection.clone().dot(direction) === 0) {
nextDirection.copy(newDirection);
atlas.audio.type.play(0.35);
}
});