rickroll Posted March 1, 2016 Share Posted March 1, 2016 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 More sharing options...
rich Posted March 1, 2016 Share Posted March 1, 2016 In short: no. But it sounds utterly trivial to store this value in your own game object somewhere. Link to comment Share on other sites More sharing options...
Recommended Posts