Manages all ball, brick, and paddle objects in the scene and keeps track of various game settings.
More...
|
| Ball | GetBall (int i) |
| | Returns the ball at index i. More...
|
| |
| Brick | GetBrick (int i) |
| | Returns the brick at index i. More...
|
| |
| Paddle | GetPaddle (int i) |
| | Returns the paddle at index i. More...
|
| |
| Ball | AddBall (float x, float y, float speed, float delay, string name="") |
| | Adds a ball to the scene. More...
|
| |
| Brick | AddBrick (float x, float y, int health=1, string name="") |
| | Adds a brick to the scene. More...
|
| |
| Paddle | AddPaddle (float x, float y, float speed, float scale=1f, string name="") |
| | Adds a paddle to the scene. More...
|
| |
| void | Clear () |
| | Resets the scene by clearing all loaded objects. More...
|
| |
| void | RemoveBrick (Brick brick) |
| | Destroys a brick and removes it from the scene. More...
|
| |
| void | RemoveBall (Ball ball) |
| | Destroys a ball and removes it from the scene. More...
|
| |
| void | RemovePaddle (Paddle paddle) |
| | Destroys a paddle and removes it from the scene. More...
|
| |
| void | ResetPositions () |
| | Resets the position of all balls and paddles loaded in the scene. More...
|
| |
| void | SlowDown (float speedIncrement=0f) |
| | Resets the speed of all balls and paddles loaded in the scene. More...
|
| |
| void | SpeedUp (float speedIncrement=0f) |
| | Speeds up all balls and paddles loaded in the scene. More...
|
| |
|
|
GameSettings | Settings = new() |
| | Structure which keeps track of various game settings.
|
| |
|
| int | NumBalls [get] |
| | Returns the number of balls currently loaded in the scene. More...
|
| |
| int | NumBricks [get] |
| | Returns the number of bricks currently loaded in the scene. More...
|
| |
| int | NumPaddles [get] |
| | Returns the number of paddles currently loaded in the scene. More...
|
| |
Manages all ball, brick, and paddle objects in the scene and keeps track of various game settings.
All public members of this class are exposed to Lua. Inherits from uLua.LuaObject.
◆ AddBall()
| Ball uLua.PaddleGame.PaddleGameState.AddBall |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
speed, |
|
|
float |
delay, |
|
|
string |
name = "" |
|
) |
| |
|
inline |
Adds a ball to the scene.
This method is exposed to the API.
- Parameters
-
| x,y | Coordinates of the new ball object. |
| speed | Speed of the new ball object. |
| delay | Time before the ball is set in motion. |
| name | (Optional) Name of the new ball object. |
◆ AddBrick()
| Brick uLua.PaddleGame.PaddleGameState.AddBrick |
( |
float |
x, |
|
|
float |
y, |
|
|
int |
health = 1, |
|
|
string |
name = "" |
|
) |
| |
|
inline |
Adds a brick to the scene.
This method is exposed to the API.
- Parameters
-
| x,y | Coordinates of the new brick object. |
| health | Health of the new brick object. |
| name | (Optional) Name of the new paddle object. |
◆ AddPaddle()
| Paddle uLua.PaddleGame.PaddleGameState.AddPaddle |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
speed, |
|
|
float |
scale = 1f, |
|
|
string |
name = "" |
|
) |
| |
|
inline |
Adds a paddle to the scene.
This method is exposed to the API.
- Parameters
-
| x,y | Coordinates of the new paddle object. |
| speed | Speed of the new paddle object. |
| scale | (Optional) Scale of the new paddle object. |
| name(Optional) | Name of the new paddle object. |
◆ Clear()
| void uLua.PaddleGame.PaddleGameState.Clear |
( |
| ) |
|
|
inline |
Resets the scene by clearing all loaded objects.
This method is exposed to the API. Destroys all balls, bricks, and paddles and removes them from the scene.
◆ GetBall()
| Ball uLua.PaddleGame.PaddleGameState.GetBall |
( |
int |
i | ) |
|
|
inline |
Returns the ball at index i.
This method is exposed to the API.
- Parameters
-
| i | The index of the object. |
◆ GetBrick()
| Brick uLua.PaddleGame.PaddleGameState.GetBrick |
( |
int |
i | ) |
|
|
inline |
Returns the brick at index i.
This method is exposed to the API.
- Parameters
-
| i | The index of the object. |
◆ GetPaddle()
| Paddle uLua.PaddleGame.PaddleGameState.GetPaddle |
( |
int |
i | ) |
|
|
inline |
Returns the paddle at index i.
This method is exposed to the API.
- Parameters
-
| i | The index of the object. |
◆ RemoveBall()
| void uLua.PaddleGame.PaddleGameState.RemoveBall |
( |
Ball |
ball | ) |
|
|
inline |
Destroys a ball and removes it from the scene.
This method is exposed to the API.
- Parameters
-
| ball | The Ball to be removed. |
◆ RemoveBrick()
| void uLua.PaddleGame.PaddleGameState.RemoveBrick |
( |
Brick |
brick | ) |
|
|
inline |
Destroys a brick and removes it from the scene.
This method is exposed to the API.
- Parameters
-
| brick | The Brick to be removed. |
◆ RemovePaddle()
| void uLua.PaddleGame.PaddleGameState.RemovePaddle |
( |
Paddle |
paddle | ) |
|
|
inline |
Destroys a paddle and removes it from the scene.
This method is exposed to the API.
- Parameters
-
◆ ResetPositions()
| void uLua.PaddleGame.PaddleGameState.ResetPositions |
( |
| ) |
|
|
inline |
Resets the position of all balls and paddles loaded in the scene.
This method is exposed to the API. Used to reset the scene without changing any game settings.
◆ SlowDown()
| void uLua.PaddleGame.PaddleGameState.SlowDown |
( |
float |
speedIncrement = 0f | ) |
|
|
inline |
Resets the speed of all balls and paddles loaded in the scene.
This method is exposed to the API.
- Parameters
-
| speedIncrement | (Optional) The value (per game level) to be retracted from the ball/paddle speed and paddle scale. |
◆ SpeedUp()
| void uLua.PaddleGame.PaddleGameState.SpeedUp |
( |
float |
speedIncrement = 0f | ) |
|
|
inline |
Speeds up all balls and paddles loaded in the scene.
This method is exposed to the API.
- Parameters
-
| speedIncrement | (Optional) The value to be added to ball/paddle speed and paddle scale. |
◆ NumBalls
| int uLua.PaddleGame.PaddleGameState.NumBalls |
|
get |
Returns the number of balls currently loaded in the scene.
This property is exposed to the API.
◆ NumBricks
| int uLua.PaddleGame.PaddleGameState.NumBricks |
|
get |
Returns the number of bricks currently loaded in the scene.
This property is exposed to the API.
◆ NumPaddles
| int uLua.PaddleGame.PaddleGameState.NumPaddles |
|
get |
Returns the number of paddles currently loaded in the scene.
This property is exposed to the API.