Exit actuator
Implementation of an actuator that will close the window when the escape key is pressed.
ExitActuator
¶
Bases: Actuator
AvatarActuator for the MATBII avatar.
Source code in matbii\avatar\exit_actuator.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | |
exit(action)
¶
Attempt method for a KeyEvent that will convert a press to Esc to a WindowCloseEvent, triggering the environment to terminate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action |
KeyEvent
|
user input event. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
WindowCloseEvent |
event to close the window. |
Source code in matbii\avatar\exit_actuator.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 | |