A class in Root.Township, the global namespace.
InputSource driven by one keyboard key, so a key can act like a controller button for a PlayerInput.
Constructors
Fields
3 private and internal fields
Properties
| Member | What it is |
|---|
Key KeyCode { get; } | The key this source listens to. |
Methods
| Member | What it is |
|---|
void AddListeners() | Registers key down and key up handlers with KeyboardEventTriggers. Called by the constructor. |
void RemoveListeners() | Removes both key handlers. |
2 private and internal methods
| Member | What it is |
|---|
private void KeyPressed(Key code) | Fires the source's pressed event for the controller. |
private void KeyUnpressed(Key code) | Fires the source's released event for the controller. |