Skip to content

Commit

Permalink
Automatically restart game
Browse files Browse the repository at this point in the history
  • Loading branch information
U1F30C committed Nov 27, 2020
1 parent 5520cf4 commit 0ac3722
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/scenes/game/InputManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,16 @@ class InputManager {
}

if (!scene.isPlaying) {
if (this.isEnterKeyJustUp) {
scene.events.emit(CONFIG.EVENTS.GAME_RESTART);
}

if (scene.readyToRestart) {
if (this.isUpKeyJustUp) {
scene.events.emit(CONFIG.EVENTS.GAME_RESTART);
}
}
scene.events.emit(CONFIG.EVENTS.GAME_RESTART);
// if (this.isEnterKeyJustUp) {
// scene.events.emit(CONFIG.EVENTS.GAME_RESTART);
// }

// if (scene.readyToRestart) {
// if (this.isUpKeyJustUp) {
// scene.events.emit(CONFIG.EVENTS.GAME_RESTART);
// }
// }
}
}

Expand Down

0 comments on commit 0ac3722

Please sign in to comment.