File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 4747- Help page
4848- Feedback button
4949- Include license
50- - Pause, and pause game while in menu
Original file line number Diff line number Diff line change @@ -489,15 +489,15 @@ function unpause() {
489489 pauseTime += ( Date . now ( ) - startPauseTime ) ;
490490 msg . innerHTML = '' ;
491491 menu ( ) ;
492- //restart timer
493- //actually unpasue the paused game eh
494492}
495493
496494function pause ( ) {
495+ if ( gameState != 3 ) {
497496 paused = ! paused ;
498497 startPauseTime = Date . now ( ) ;
499498 msg . innerHTML = "Paused" ;
500- menu ( 4 ) ;
499+ menu ( 4 ) ;
500+ }
501501}
502502
503503/**
@@ -1246,9 +1246,7 @@ function update() {
12461246 menu ( 3 ) ;
12471247 }
12481248
1249- if ( ! paused ) {
12501249 statistics ( ) ;
1251- }
12521250
12531251 if ( lastKeys !== keysDown ) {
12541252 lastKeys = keysDown ;
@@ -1267,7 +1265,7 @@ function gameLoop() {
12671265 if ( ! paused ) {
12681266 update ( ) ;
12691267 }
1270-
1268+
12711269 if ( ( fallingPiece . x !== lastX ||
12721270 Math . floor ( fallingPiece . y ) !== lastY ||
12731271 fallingPiece . pos !== lastPos ||
You can’t perform that action at this time.
0 commit comments