Jump to content

Phaser states management?


Legomite
 Share

Recommended Posts

Should I create the variables to be linked to the states? So for example if I wanted to create a group for one state only, I use

this.add.group

instead of

game.add.group

 

What happens to the sprites in the previous state? Do they get deleted? Does it return the variable to null?

I have a custom system that holds an array of UI elements. The system runs through the list to reposition and match the browser window, but I think it'll break if it runs through dead variables.

 

Thanks

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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