Search the Community
Showing results for tags 'removeall'.
Found 1 result
KevinnFtw posted a topic in Phaser 2Hey guys, I'm having some issues switching between states. In the first run it all works fine, but then when I come back to a state I've already been at, like MainMenu, the design is all messed up. I think it is because not all sprites and stuff are removed when I switch states, that's why I added a this.world.removeAll() in my shutdown function. However that doesn't seem to do anything. Is there another short way to delete everything (except cache) from a state before switching to another state, or does it have to be done manually? I've attached 2 images, one of my MainMenu first time, and one of the MainMenu when I switch back to it (after the Game). Excuse me if it is a silly question, I've just recently started using states.. Thanks, Kevin