Package gaiasky.interafce
Class KeyboardInputController
java.lang.Object
com.badlogic.gdx.InputAdapter
gaiasky.interafce.KeyboardInputController
- All Implemented Interfaces:
com.badlogic.gdx.InputProcessor
public class KeyboardInputController
extends com.badlogic.gdx.InputAdapter
This input inputListener connects the input events with the key binding actions
-
Field Summary
Fields Modifier and Type Field Description KeyBindingsmappingsjava.util.Set<java.lang.Integer>pressedKeysHolds the pressed keys at any moment -
Constructor Summary
Constructors Constructor Description KeyboardInputController(com.badlogic.gdx.Input input) -
Method Summary
Methods inherited from class com.badlogic.gdx.InputAdapter
keyTyped, mouseMoved, scrolled, touchDown, touchDragged, touchUpMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
mappings
-
pressedKeys
public java.util.Set<java.lang.Integer> pressedKeysHolds the pressed keys at any moment
-
-
Constructor Details
-
KeyboardInputController
public KeyboardInputController(com.badlogic.gdx.Input input)
-
-
Method Details
-
keyDown
public boolean keyDown(int keycode)- Specified by:
keyDownin interfacecom.badlogic.gdx.InputProcessor- Overrides:
keyDownin classcom.badlogic.gdx.InputAdapter
-
keyUp
public boolean keyUp(int keycode)- Specified by:
keyUpin interfacecom.badlogic.gdx.InputProcessor- Overrides:
keyUpin classcom.badlogic.gdx.InputAdapter
-