Jump to content

Push and Pop Paused States with Phaser.js


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?


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

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