public final class Input
extends java.lang.Object
Input
class is the LITIengine's access point to devices that capture physical player input.
It manages input from different devices, i.e. keyboard, mouse or gamepad, and provides a unified API to access this information.mouse()
,
keyboard()
,
gamepads()
Modifier and Type | Class and Description |
---|---|
static class |
Input.InputGameAdapter |
Modifier and Type | Method and Description |
---|---|
static GamepadManager |
gamepads()
Gets the manager for all gamepad input devices.
|
static IKeyboard |
keyboard()
Gets the keyboard input device.
|
static IMouse |
mouse()
Gets the mouse input device.
|
public static GamepadManager gamepads()
The manager provides easy access to the default controller as well as access by gamepad index for mulitplayer games. Gamepads don't need to be added explicitly, the manager supports hot-plugging at runtime and will auto-detect any added/removed gamepads.
This returns null if Game.config().input().isGamepadSupport()
is set to false.
GamepadManager.current()
,
GamepadManager.get(int)
public static IKeyboard keyboard()
public static IMouse mouse()