LibGDX - What is the difference between isKeyPressed and isKeyJustPressed?

What is the difference between isKeyPressed and isKeyJustPressed ?!

I was looking for documents. for the difference and just found:

isKeyPressed: Returns whether a key is pressed.

isKeyJustPressed: Returns whether a key has just been pressed.

Does anyone know something that better explains ?!

+5
source share
1 answer

isKeyPressed determines if a key is pressed.

isKeyJustPressed determines if the key was pressed and the last frame was released.

+4
source

Source: https://habr.com/ru/post/1260827/


All Articles