OneSillyLion Posted November 10, 2018 Share Posted November 10, 2018 Hello Guys! First of all, this is my first topic! I've read some of your questions and answers, and most of them have helped me a lot with Phaser 2 to 3 update. Thanks a lot for all the hard work. But, I have some questions. Right now I'm updating one of my games from Phaser 2 to Phaser 3, and wow its a lot of classes updates. and logic changes. But I need a suggestion in one of them. In Phaser 2, I extended the Phaser.Game class to save some data on it (most of it its configuration data), and I could access it from ANYWHERE in my classes and states. Now in Phaser 3, with the scene logic introduction and game (world) not even accessible (well, I could with Scene Injection Map, but you don't recommend it), I can't reach this data. To make this data 'globally" accessible again, I thought maybe creating an immortal scene should be enough, or maybe an object out of phaser 3 logic. Is this a correct approach? Am I missing something that could make this easier? Link to comment Share on other sites More sharing options...
OneSillyLion Posted November 10, 2018 Author Share Posted November 10, 2018 I just had this idea that since I can send data through scenes, maybe I could send this config data through them. but I don't know how to send them from my game instance through my first scene. Exists this sceneConfig property, but I don't know if I can use it for this. Link to comment Share on other sites More sharing options...
samme Posted November 10, 2018 Share Posted November 10, 2018 Use this.registry from a scene. OneSillyLion 1 Link to comment Share on other sites More sharing options...
OneSillyLion Posted November 13, 2018 Author Share Posted November 13, 2018 Thanks a lot, it worked nice! Link to comment Share on other sites More sharing options...
Recommended Posts