simonwollerton Posted January 7, 2016 Share Posted January 7, 2016 Hello guys i got a quick question for you.It's probably a noob thing because this is the first time i've used Phaserand the Virtual Joystick Plugin at all.I have a basic game with a game state and a main state, the main statebeing a menu containing scores, high score and tap here to start etc.The Virtual Joystick Plugin is instantiated and started from within thegame state and works great. The problem i have is when the player dies andthe game drops out to the menu the Virtual Joystick remains on the canvasand no matter what i try i can't destroy and restart it. On game restartthe Virtual Joystick is redrawn and you end up with multiple instancesdrawn on the canvas.Thanks for any help.Si Link to comment Share on other sites More sharing options...
rich Posted January 7, 2016 Share Posted January 7, 2016 Call Stick.destroy on your joystick instance in your State shutdown method. Link to comment Share on other sites More sharing options...
simonwollerton Posted January 7, 2016 Author Share Posted January 7, 2016 Call Stick.destroy on your joystick instance in your State shutdown method.Thanks Rich Link to comment Share on other sites More sharing options...
Recommended Posts