Hello, how do I access the game config parameters which are used in the new Phaser.Game(config) declaration (in different file)? Namely, I need the parent property of the config.
I tried Phaser.Game.config, but it appears undefined.
Edit: In fact, I need the actual DOM element defined by the parent property.
The game.domContainer is probably going to work, but I went with the samme’s solution (this.scale.parent) which is simpler to use.
You are right about the Phaser.Game status. I wasn’t thinking much about it, just trying and hoping it could be a static method or so…
Strange thing is that this.scale.parent has many undefined values: width, displayWidth, and innerWidth. At last, clientWidth worked for the width detection.