I need to have a game load and boot but wait to have the game state started from a button in the DOM.
I had done this with Phaser 2 when the game is defined like:
var game;
(function() {
game = new Phaser.Game(640, 1138, Phaser.CANVAS, ‘kaiju-game’);
game.state.add(“Boot”,boot);
game.state.add(“TheGame”,theGame);
game.state.start(“Boot”);
})();
using this function:
function startgame(){
game.state.start(“TheGame”);
}
what would be the equivalent in Phaser 3 when the game is defined like:
export default new Phaser.Game({
type: Phaser.AUTO,
scene: [Boot, TheGame, GameStart],
});
Thanks for any help.