I've encountered an issue with switching scenes in Phaser 3. I have attempted to use scene.switch and scene.start, but it seems that these are not recognized methods on the Phaser.Scene object in Phaser 3. How can I go about changing scenes in Phaser 3? Any assistance would be highly appreciated, as I have been unable to find any alternative solutions. Thank you!
// Entry point for My Game
HomePage.ngZone.runOutsideAngular(() => {
this.config = {
type: Phaser.AUTO,
scale: {
mode: Phaser.Scale.FIT,
},
parent: 'game',
scene: [MazeScene, MainScene],
physics: {
default: 'matter',
matter: {
debug: false,
gravity: {
y: 0.0,
x: 0.0,
},
},
},
};
this.phaserGame = new Phaser.Game(this.config);
});
After trying both scene.start('main')
and scene.swap('main')
, I discovered that neither of these methods exist within the Phaser.Scene class in Phaser 3.