new Controller(p_init, p_plane, p_snake)
Parameters:
| Name | Type | Description |
|---|---|---|
p_init |
Object | Should contain the attribute
keys (the keys to control the move direction of
the snake) and
speed (the speed of the snake). |
p_plane |
$app$.game.snake.Plane | The plane where the snake has been placed. |
p_snake |
$app$.game.snake.Snake | The snake itself. |
- Source:
Methods
-
startGame()
-
Starts the game.
- Source:
-
stopGame()
-
Stops the game.
- Source: