polansk1 Posted May 22, 2018 Share Posted May 22, 2018 Hi guys! I have a problem with my restart function. Can't move my player after trigger him. In my restart button i call that function: function restartGame (){ game.scene.start('level1') juego2.scene.switch('level1') } Switch from my Game over menu to inicial scene well, but then can't move :S Console alert: Invalid Animation Key, or Key already in use: down. Any idea? Link to comment Share on other sites More sharing options...
B3L7 Posted May 22, 2018 Share Posted May 22, 2018 I think you want: this.scene.restart(); See https://labs.phaser.io/edit.html?src=src\scenes\restart a scene.js Link to comment Share on other sites More sharing options...
polansk1 Posted May 22, 2018 Author Share Posted May 22, 2018 happen the same :S it's like not reading the update Link to comment Share on other sites More sharing options...
polansk1 Posted May 22, 2018 Author Share Posted May 22, 2018 Ok, i forgot to turn my variable gameOver to "false" that was the problem my update is under that conditional. srry hahah aand thank you!! LET'S GO! Link to comment Share on other sites More sharing options...
Recommended Posts