Jump to content

Push and Pop Paused States with Phaser.js


TomLGD
 Share

Recommended Posts

Hi, for my game I use a simple state order like:

Main Menu -> Map screen -> Level 1 -> Map screen -> Level 2 -> and so on

That works well :) Just separate everything in logical chunks.
But now I had the Idea of implementing some kind of minigames interrupting the level.

And thats the point. If I make a state change, the state is resetted if the minigame itself is a state too.
Other version is, that the minigame is just a game packed in a group on top of the current state.
but this approach make some trouble too cause of physics side effects.

So what I desire: Push a new state, play that state and then pop this state and get the
old state right there where it ends before.

For me this push/pop approach sound very "correct" and intuitive.
Is this possible with phaser somehow?

Thanks
Tom

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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