Jump to content

Restart Phaser Game


Elza Tom
 Share

Recommended Posts

I came across a problem while the play again button is clicked. I have 3 states in my game. when the game is over, there is a button given to the user for playing again, that button leads the user to game state. I have used P2 physics. I am using sprite.id for collision detection, but while playing again the id changes every time. I tried using destroy() to delete the existing p2. But that gave me more errors while playing.

How can i reset the Physics when playagain button is clicked?

Hope someone can help in this?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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