emily2278 Posted May 14, 2021 Share Posted May 14, 2021 Right now, my main game has 2 scenes: The main game A score counter HUD at the top I am trying to create a Game Over screen with a Play Again button, where once the button is pressed, the score is reset and the main game is reloaded. Currently I am doing this: this.play_again_button.on('pointerdown', () => { console.log('Play again button has been clicked'); this.scene.stop(); this.scene.launch('Game'); this.scene.launch('Score'); }); Where basically, the current "Game Over" screen is stopped, and the 2 scenes for the main game mentioned above are reloaded. While this sort of works, I have a problem where the reload is taking forever and the browser is warning me that the game is making the page very slow. I am not sure if this is the best practice to go about creating a restart button for a game. Does anyone have any advice/tips? Link to comment Share on other sites More sharing options...
Recommended Posts