Jump to content

How to start previous state?


rickroll
 Share

Recommended Posts

Hey, i have a 'deathscreen' state in my game, which starts when player dies. It prints top-5 highscores from backend to death-screen, gives you continue button and restart button. 

Question is, that is there an option to call previous state in phaser? So when you press 'continue-button', previous state starts?

I cant use  this.game.state.start('game3'); or this.game.state.restart, because when you die, the 'previous' state can be any level between 1-8.

The reason i have own state for my death-screen is, that when i try load json inside preload of game state, it wont print anything after player dies and game does death-screen function. 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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