Compare commits
2 Commits
ef8ddca950
...
a89a60691c
Author | SHA1 | Date | |
---|---|---|---|
a89a60691c | |||
a04e118ff1 |
@ -120,7 +120,7 @@ td {
|
||||
}
|
||||
|
||||
.locking.mino {
|
||||
animation: blinker 0.04s step-start infinite;
|
||||
animation: blinker 0.08s step-start infinite;
|
||||
}
|
||||
|
||||
.ghost.mino {
|
||||
@ -132,10 +132,10 @@ td {
|
||||
}
|
||||
|
||||
@keyframes cleared-line-animation {
|
||||
5%, 15%, 25%, 35%, 45%, 55%, 65%, 75%, 85%, 95% {
|
||||
10%, 30%, 50%, 70%, 90% {
|
||||
opacity: 0;
|
||||
}
|
||||
10%, 20%, 30%, 40%, 50%, 60%, 70%, 80%, 90% {
|
||||
20%, 40%, 60%, 80% {
|
||||
opacity: 100%;
|
||||
}
|
||||
}
|
||||
|
@ -119,9 +119,9 @@ let playerActions = {
|
||||
hardDrop: function() {
|
||||
scheduler.clearTimeout(lockDown)
|
||||
playSound(hardDropSound)
|
||||
while (matrix.piece.move(TRANSLATION.DOWN, ROTATION.NONE, true)) stats.score +=2
|
||||
while (matrix.piece.move(TRANSLATION.DOWN, ROTATION.NONE, true)) stats.score += 2
|
||||
matrix.table.classList.add("hard-dropped-table-animation")
|
||||
lockDown()
|
||||
lockDown(true)
|
||||
return true
|
||||
},
|
||||
|
||||
@ -215,10 +215,10 @@ function fall() {
|
||||
matrix.piece.move(TRANSLATION.DOWN)
|
||||
}
|
||||
|
||||
function lockDown() {
|
||||
function lockDown(hardDropped=false) {
|
||||
scheduler.clearTimeout(lockDown)
|
||||
scheduler.clearInterval(fall)
|
||||
if (lastActionSucceded) wallSound.play()
|
||||
if (lastActionSucceded && !hardDropped) playSound(wallSound)
|
||||
|
||||
if (matrix.lock()) {
|
||||
let tSpin = matrix.piece.tSpin
|
||||
|
@ -349,13 +349,11 @@ class Tetromino {
|
||||
}
|
||||
matrix.drawPiece()
|
||||
return true
|
||||
} else if (!hardDropped) {
|
||||
if (translation == TRANSLATION.DOWN) {
|
||||
} else if (!hardDropped && translation == TRANSLATION.DOWN) {
|
||||
this.locked = true
|
||||
if (!scheduler.timeoutTasks.has(lockDown))
|
||||
scheduler.setTimeout(lockDown, stats.lockDelay)
|
||||
matrix.drawPiece()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user