Good afternoon, when you click on the button, a new js-file with the code is loaded, there are scenes there. How do I add these scenes to the config?
You can use the add
function of the Phaser.Scenes.SceneManager
. link to the documentation
like in this example, here the important code part:
var game = new Phaser.Game(config);
....
game.scene.add('newScene', NewScene, true, { x: 800, y: 600 });
I just decided. Yesterday, apparently, I was tired. Everything worked today.