Class InputManager

Manages input bindings and queries input state.

class InputManager;

Constructors

NameDescription
this (em) Constructs an InputManager and loads input bindings from "input.conf".

Fields

NameTypeDescription
config ConfigurationThe configuration object for input bindings.
eventManager EventManagerThe event manager used for input state.

Methods

NameDescription
addBindings (name, value) Adds one or more bindings for the given action name.
clearBindings (name) Removes all bindings for the given action name.
getAxis (name) Gets the axis value for the given action name.
getButton (binding) Checks if the given binding is currently pressed.
getButton (name) Checks if any binding for the given action name is currently pressed.
getButtonDown (name) Checks if any binding for the given action name was pressed this frame.
getButtonUp (name) Checks if any binding for the given action name was released this frame.

Aliases

NameDescription
Bindings Dictionary mapping action names to arrays of bindings.

Description

Loads input configuration from file, allows mapping named actions to multiple bindings, and provides methods to query button and axis states.