I’ve been scratching my head to find an easy way to make a “Main Menu” and start a scene on button click but everything I found online is in a different structure to the way I did my code (following this tutorial series: https://www.youtube.com/watch?v=frRWKxB9Hm0).
I currently have:
class Boot extends Phaser.Scene{
constructor(){
//super() inherits all the characteristics of the Phaser "scene" class
super("bootGame");
}
create(){
this.add.text(256,256, "Loading Game...");
this.input.once('pointerup', function () {this.scene.start("playGame")}, this);
}
}
And I want to make it so that I start the playGame scene when I click a button instead of anywhere on screen.