Hello Guest

Something like KeyReleased function?

  • 1 Replies
  • 3874 Views
Something like KeyReleased function?
« 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()


*

Offline kappa

  • *****
  • 1314
Re: Something like KeyReleased function?
« Reply #1 on: December 23, 2010, 16:46:18 »
have a read of the LWJGL Input Tutorial.