class FractalPlugin extends Phaser.Plugins.ScenePlugin {
constructor (scene, pluginManager)
{
console.log('1', scene)
super(scene, pluginManager);
}
start() {
console.log('start1')
}
boot ()
{
console.log('boot1')
}
}
class Main extends Phaser.Scene
{
constructor ()
{
super({key:'Main'});
}
create() {
console.log('Main')
}
}
const config = {
type: Phaser.AUTO,
parent: 'phaser-example',
width: 800,
height: 600,
plugins: {
scene: [
{ key: 'fractalPlugin',start:true, plugin: FractalPlugin }
]
},
scene: [Main]
};
let game = new Phaser.Game(config);
Please help me explain why FractalPlugin was initialized twice. Is the first initialization necessary?