View source code: https://github.com/a-mean-blogger/text-game-maker-js/blob/master/src/managers/input-manager/input-manager.js
Class (extends TM.IObject)
A class that creates instances manage other instances get user inputs. There is Currently only one sub instance for keyboard input(TM.InputManager_keyboard's instance).
Text Game Maker JS v1.0.0 only supports keyboard input, it does not supports mouse nor touch inputs. They can be added later version.
- customTargetDomId(optional): HTML DOM ID the inputs are captured on. (default: TM.defaultSettings.screen.canvasId)
true for debugging,
false for production. (default: false). If it's true, it prints input information on the browser console for debugging.
- isActive: It will be set
true after calling init function,
false after calling inactivate. The Object status(active/inactive) can be checked by this property.
- keyboard: As an instance of TM.InputManager_Keyboard, it captures keyboard inputs.
- init(): activates/initializes the instance. (It executes when the instance created)
- inactivate(): inactivates the instance. User inputs will not be captured.
- Keyboard input example: Please see this on TM.InputManager_Keyboard