Jump to content

How do I end a state?


JakeCake
 Share

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,

 

https://github.com/photonstorm/phaser/wiki/Phaser-General-Documentation-:-States

 

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

 Share

  • Recently Browsing   0 members

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