keyDown method
- KeyCodes key
Checks if a specific key
is currently held down.
key
: The KeyCodes value to check.
Returns true
if the key
is down, false
otherwise.
Returns false
if key
is KeyCodes.Unknown.
Implementation
bool keyDown(KeyCodes key) {
return (key == KeyCodes.Unknown) ? false : _keyDown[key] ?? false;
}