Skip to content

Events

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.

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 done has been called in front of a Door object with the correct colour.

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.

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.

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.