new MicrogameInput()
Controls keyboard and controller support for interacting with menus and games. Will disable some inputs from going through unless it recognizes them.
- Source:
Members
baseBindings
Bindings to allow input for no matter what.
- Source:
bindings
A map of maps.
The bindings to use for each game (or all of them).
- Source:
- To Do:
-
- FIX to be a map for all games.
(private) currBinding
The current set of bindings we’re using from this.bindings. Set in module:input~MicrogameInput#gameInputStartUpdate based on the current game being played.
- Source:
(private) stateTracker
What keys/controls are currently being used. Used in module:input~MicrogameInput#update exclusively.
- Source:
Methods
gameStartInputUpdate(game)
Resets module:input~MicrogameInput#stateTracker and module:input~MicrogameInput#currBinding based on game. If the game’s bindings exist in MicrogameInput.baseBindings, use those. Otherwise, use “all”.
Parameters:
Name | Type | Description |
---|---|---|
game |
string | Current game being played. |
- Source:
update()
Called by MicrogameInputManager. Updates module:input~MicrogameInput#stateTracker based on inputs it detects.
- Source:
Returns:
The keys that we're going to be pressing based on our recieved inputs.