spinend sound

This commit is contained in:
2026-03-27 08:32:43 +01:00
parent 81c49ed4ae
commit a4f7ba0e08
3 changed files with 8 additions and 2 deletions

5
app.js
View File

@@ -50,6 +50,7 @@ let game = {
setTimeout(() => pauseSpan.innerHTML = "2", 1000)
setTimeout(() => pauseSpan.innerHTML = "1", 2000)
setTimeout(() => {
pauseSpan.innerHTML = ""
document.onkeydown = onkeydown
document.onkeyup = onkeyup
window.onblur = game.pause
@@ -186,9 +187,9 @@ let playerActions = {
moveRight: () => scene.playfield.piece.move(TRANSLATION.RIGHT)? scene.moveSound.play() : scene.hitSound.stop() && scene.hitSound.play(),
rotateCW: () => scene.playfield.piece.rotate(ROTATION.CW)? scene.rotateSound.stop() && scene.rotateSound.play() : scene.hitSound.stop() && scene.hitSound.play(),
rotateCW: () => scene.playfield.piece.rotate(ROTATION.CW)? scene.rotateSound.stop() && scene.rotateSound.play() : scene.spinEndSound.stop() && scene.spinEndSound.play(),
rotateCCW: () => scene.playfield.piece.rotate(ROTATION.CCW)? scene.rotateSound.stop() && scene.rotateSound.play() : scene.hitSound.stop() && scene.hitSound.play(),
rotateCCW: () => scene.playfield.piece.rotate(ROTATION.CCW)? scene.rotateSound.stop() && scene.rotateSound.play() : scene.spinEndSound.stop() && scene.spinEndSound.play(),
softDrop: function () {
if (scene.playfield.piece.move(TRANSLATION.DOWN)) {