Browse Source

revert back: click restart button to restart the game, cause if click so fast you may not see the game over screen and the new game stared, that's weird

wayou 4 years ago
parent
commit
3c9d97cd3f
1 changed files with 2 additions and 3 deletions
  1. 2 3
      index.js

+ 2 - 3
index.js

@@ -682,9 +682,8 @@
                     }
                 }
 
-                // if (this.crashed && e.type == Runner.events.TOUCHSTART &&
-                //     e.currentTarget == this.containerEl) {
-                if (this.crashed && e.type == Runner.events.TOUCHSTART) {
+                if (this.crashed && e.type == Runner.events.TOUCHSTART &&
+                    e.currentTarget == this.containerEl) {
                     this.restart();
                 }
             }