no sound if volume = 0
This commit is contained in:
parent
2aec3e55d9
commit
2411416b01
4
app.js
4
app.js
@ -1107,10 +1107,10 @@ function lockDown() {
|
||||
let nbClearedLines = matrix.clearLines()
|
||||
if (nbClearedLines == 4 || (nbClearedLines && tSpin)) {
|
||||
tetrisSound.currentTime = 0
|
||||
tetrisSound.play()
|
||||
if (tetrisSound.volume) tetrisSound.play()
|
||||
} else if (nbClearedLines || tSpin) {
|
||||
lineClearSound.currentTime = 0
|
||||
lineClearSound.play()
|
||||
if(lineClearSound.volume) lineClearSound.play()
|
||||
}
|
||||
stats.lockDown(nbClearedLines, tSpin)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user