Jump to content

A 'global' container, Ideas?


OneSillyLion
 Share

Recommended Posts

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

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...