Sprite::setWhenKeyPressed()
Sets the handler for when a key is pressed. This allows you to define custom behavior when a key is pressed.
Syntax
Java
.setWhenKeyPressed(whenKeyPressed)
Parameters
| Name | Data Type | Description |
|---|---|---|
| whenKeyPressed | WhenKeyPressedHandler | A KeyPressedHandler that takes a Sprite and an |
Return
void
