Jump to content

Best way to display 2 states, or split a state


rseeberg
 Share

Recommended Posts

Hello!

 

I'm working on a small project in phaser in order to get to know it better.

But i've stumbled on a small problem im not quite sure how to overcome.

 

What i would like to do is somehow split the canvas into two parts, left and right (visually)

and on the left part render a state (my game level)

and on the right part render various gui elements (menu, information about entities in the game, etc)

 

This seems like a rather trivial thing to me, but im not really sure how to approach and solve this issue.

 

Any ideas on how to do something like this?

 

 

Regards

 

 

 

 

 

Link to comment
Share on other sites

States currently don't work this way - you'd need to create and manage the elements yourself. I guess you could create a 'class' for your UI and instantiate it on each new level maybe? Or even just create it once and store references in that object to all of its display objects etc, then just retrieve it between states.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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