public class KeyState
extends java.lang.Object
Input
Modifier and Type | Field and Description |
---|---|
boolean |
down
True during any frame the button is physically down in the active position.
|
int |
framePressed
What the frameCount was equal to last time
released was true for this key or keyCode. |
int |
frameReleased
What the frameCount was equal to last time
pressed was true for this key or keyCode. |
boolean |
pressed
True for one frame after the button is pushed down to its active position.
|
boolean |
released
True for one frame after the button is released up from its active position into the idle position.
|
Constructor and Description |
---|
KeyState(boolean down,
boolean pressed,
boolean released)
Used internally by the InputWatcherBackend.
|
public boolean down
public boolean pressed
framePressed
to the current frameCount
when true.public boolean released
frameReleased
to the current frameCount
when true.public int framePressed
released
was true for this key or keyCode.
Equal to -Integer.MAX_VALUE rather than 0 by default to not display an animation on startup when using
norm(frameCount, framePressed, framePressed + animationDuration)
public int frameReleased
pressed
was true for this key or keyCode.
Equal to -Integer.MAX_VALUE rather than 0 by default to not display an animation on startup when using
norm(frameCount, frameReleased, frameReleased + animationDuration)