Search the Community
Showing results for tags 'restart button'.
-
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?
-
- phaser3
- restart button
-
(and 2 more)
Tagged with:
-
Hi there, I am quite new to PandaJS framework. Can anyone please give me an example as to how to implement a simple restart button after the game over function has been called. Thank you! Mer,