Class InputManager
Manages input bindings and queries input state.
Constructors
| Name | Description |
this
(em)
|
Constructs an InputManager and loads input bindings from "input.conf".
|
Methods
| Name | Description |
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
| Name | Description |
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.