Anyone familiar with phaser? Question about keyboard and states
Hello.
I'm using phaser for a school project, making a 2d platformer. I have multiple levels with states for each. Transition works fine, but keyboard stops working once the new state is loaded. Currently I'm using:
this.cursors = this.input.keyboard.createCursorKeys ();
I am calling it in the create function of both level.js and level2.js (commenting it out of level2.js doesn't change anything).
Everything else is working fine in the 2nd level, things are scrolling, enemies are moving, just keyboard input doesn't work anymore. Getting stumped. Advice?
Posted Aug 17, 2017, 8:31 PM UTC
10