Jump to content

Restart state completely


Recommended Posts

Hi all 


I have a big problem:


At the game over scene which is in the same of the game state, i have two button replay and main menu


When i click replay which have the function:





The state restart but when i click at the place where the button was, the state restate again.


I think that the button is not destroyed just the sprite which is destroyed, i have tried button.kill() and button.destroy() before restating state but i get an error.


And when i do : 





I get an error of an undefined velocity ......., 


The question is, is there any way to restart the state like if it's the first time the state is started ??

Link to comment
Share on other sites


  • Recently Browsing   0 members

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