Events
on_ball_hit(state)
Checks whether the ball has hit something using the ball_hit
event.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
state |
State
|
The current state of the game. |
required |
Returns:
Name | Type | Description |
---|---|---|
Array |
Array
|
A boolean array indicating whether the ball has hit something. |
on_door_done(state)
Checks whether the action done
has been called in front of a Door
object with the correct colour.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
state |
State
|
The current state of the game. |
required |
Returns:
Name | Type | Description |
---|---|---|
Array |
Array
|
A boolean array indicating whether the action |
on_goal_reached(state)
Checks whether the goal has been reached using the goal_reached
event.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
state |
State
|
The current state of the game. |
required |
Returns:
Name | Type | Description |
---|---|---|
Array |
Array
|
A boolean array indicating whether the goal has been reached. |
on_lava_fall(state)
Checks whether the lava has fallen using the lava_fall
event.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
state |
State
|
The current state of the game. |
required |
Returns:
Name | Type | Description |
---|---|---|
Array |
Array
|
A boolean array indicating whether the lava has fallen. |
on_wall_hit(state)
Checks whether the wall has been hit using the wall_hit
event.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
state |
State
|
The current state of the game. |
required |
Returns:
Name | Type | Description |
---|---|---|
Array |
Array
|
A boolean array indicating whether the wall has been hit. |