Beispiel #1
0
 public boolean isKeyDown(final KeyboardKeys key) {
   return glfwGetKey(getWindowID(), key.getKeyCode()) == GLFW_PRESS;
 }
Beispiel #2
0
 public boolean isKeyReleased(final KeyboardKeys key) {
   return !isKeyDown(key) && keyStatesPreviousCycle[key.getKeyCode()];
 }
Beispiel #3
0
 @Override
 protected void storeStatesForNextCycle() {
   for (KeyboardKeys key : KeyboardKeys.values()) {
     keyStatesPreviousCycle[key.getKeyCode()] = isKeyDown(key);
   }
 }