First of all, I'm really enjoying working with JME3. So far it is really working fairly well. Keep up the great work.
I've been going through the HelloJME3 tutorial series and I have been really learning a lot from those tutorials so thanks a lot to whoever has been writing these (says last modified by Zathras?). Anyway, I'm on the HelloInput lesson and I have a little issue that I couldn't find on the forums.
In the exercises section, the author challenges us to make the P key a pause button. Seems easy enough…so I was able to do it but I noticed that it just rapidly switches the isRunning flag from true to false so once you let go of the P key the game can still be paused! Even if you just tap it quickly the flag can easily change a few times. Is there a way yet to make it so that once a key is pressed it just does one thing? In other words, make it so that if the user presses and holds the P key it just switches the isRunning flag once, no matter how long he/she holds it?
Thanks for any help. I'll keep looking to see if I can figure this out.
By the way, here is my code for registering the P key and what the binding should do when the P key is pressed.
//from the initKeys() method
//from the onBinding() method
_isRunning = !_isRunning;
//Used to see that the flag rapidly switches while P key is down.