LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: AaronLLF on December 23, 2010, 16:37:28

Title: Something like KeyReleased function?
Post by: AaronLLF on December 23, 2010, 16:37:28
In a new game I'm making, I'm testing my health system out by using "F" to give 1 (out of 20 total) damage points. The problem is, You die practically immediately, because it's "isKeyDown", which repeats the process. So, I'll need a simple function similar to a KeyReleased, or KeyPressed type thing. BTW, if you need, the name of the health functions are:
playerGetDamage(int damage)
checkDeath()
playerDie()

Title: Re: Something like KeyReleased function?
Post by: kappa on December 23, 2010, 16:46:18
have a read of the LWJGL Input Tutorial (http://www.ninjacave.com/lwjglbasics2).