Jump to content

How do I end a state?


Recommended Posts

I am trying to have two states working at the same time, which is going as suspected. So I have state A running, and on top of that I start state B. Then after a while I want to end state B so only state A is running again.


The problem is that I can't shutdown state B. Calling the shutdown function doesn't really do anything. And shutting it down by doing "game.state.start('A', true);" restarts state A, which is unwanted. I just want to shutdown state B and return to state A.

Link to comment
Share on other sites

Hello Jake,




So, you're saying that shutdown hook on state definition aren't being called? what do you have on create, update, etc?


Is there any timeout, timer, tween, anything, that keeps running even if you start another state?

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...