Nervosa Posted September 16, 2013 Share Posted September 16, 2013 Hey, I'm just trying to learn the engine... So I'm building asteroids or some sort of shooter. I don't even know yet. Anyway, it's current form is here: http://l.messymind.net/temp/dist/ CTRL fires, arrow keys move. Was wondering if when I press control to fire, and click another tab, when I come back it's still firing despite no control being. I'm just using key down event to fire. If you're interested in the code, here ya go: https://github.com/NervosaX/Phaseroids Link to comment Share on other sites More sharing options...
rich Posted September 16, 2013 Share Posted September 16, 2013 I'll have to look into this a bit more, it's likely an issue with the event listener not receiving the keyUp event from the browser (or it not being picked up by the page the game is on). A quick fix would be to run input.reset() when the game resumes from being paused, or even just input.keyboard.reset actually. You can listen to game.onPaused and game.onResume to find out when that happens. Link to comment Share on other sites More sharing options...
Recommended Posts