new Key()
Key is used by Keyboard, Pointer, etc, to represent a key state.
- Source:
Members
justPressed :boolean
Indicates if this key was just pressed.
Type:
- boolean
- Source:
justReleased :boolean
Indicates if this key was just released.
Type:
- boolean
- Source:
pressed :boolean
Indicates if this key is currently pressed.
Type:
- boolean
- Source:
Methods
reset()
Reset key to default values.
- Source:
set()
Set this key attributes manually.
- Source:
update(action)
Update Key status based on new key state.
Parameters:
Name | Type | Description |
---|---|---|
action |
number | Key action that was performed. |
- Source: