Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

First project WIP. Wondering if this is a bug.


Nervosa
 Share

Recommended Posts

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

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

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...