fix action timout on key up
This commit is contained in:
parent
d56a8a6b06
commit
04f6eaf5dc
@ -206,7 +206,7 @@ function onkeyup(event) {
|
|||||||
scheduler.clearTimeout(repeat)
|
scheduler.clearTimeout(repeat)
|
||||||
scheduler.clearInterval(autorepeat)
|
scheduler.clearInterval(autorepeat)
|
||||||
if (actionsQueue.length) {
|
if (actionsQueue.length) {
|
||||||
if (action == playerActions.softDrop) scheduler.setInterval(autorepeat, settings.fallPeriod/20)
|
if (actionsQueue[0] == playerActions.softDrop) scheduler.setInterval(autorepeat, settings.fallPeriod/20)
|
||||||
else scheduler.setTimeout(repeat, settings.das)
|
else scheduler.setTimeout(repeat, settings.das)
|
||||||
} else {
|
} else {
|
||||||
matrix.drawPiece()
|
matrix.drawPiece()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user