uLua Paddle Game v2.2.0
A paddle game for Unity made as an example use of the uLua toolkit.
uLua.PaddleGame.Ball Class Reference

Wrapper class which exposes ball objects to the API. More...

Public Member Functions

void AdjustAngle (float Degrees)
 Adjusts the angle of motion of the ball by the specified value. More...
 
void Reset ()
 Resets the position of the ball to its starting position and sets the ball in motion. More...
 

Protected Member Functions

override void Awake ()
 Initialises the BallController component reference on awake.
 

Properties

float Delay [get, set]
 Access/set the delay (in seconds) before the ball is set in motion. More...
 
bool IsStuck [get]
 Checks if the ball is in risk of getting stuck bouncing in a straight line back and forth (horizontally or vertically). More...
 
float Speed [get, set]
 Access/set the speed of the ball. More...
 
Vector2 StartingPosition [get, set]
 Access/set the starting position of the ball. More...
 

Detailed Description

Wrapper class which exposes ball objects to the API.

All public members of this class are exposed to Lua. Inherits from uLua.ExposedMonoBehaviour.

Member Function Documentation

◆ AdjustAngle()

void uLua.PaddleGame.Ball.AdjustAngle ( float  Degrees)
inline

Adjusts the angle of motion of the ball by the specified value.

This method is exposed to the API. /**

Parameters
DegreesThe adjustment value (in degrees) for the angle.

◆ Reset()

void uLua.PaddleGame.Ball.Reset ( )
inline

Resets the position of the ball to its starting position and sets the ball in motion.

This method is exposed to the API.

Property Documentation

◆ Delay

float uLua.PaddleGame.Ball.Delay
getset

Access/set the delay (in seconds) before the ball is set in motion.

This property is exposed to the API.

◆ IsStuck

bool uLua.PaddleGame.Ball.IsStuck
get

Checks if the ball is in risk of getting stuck bouncing in a straight line back and forth (horizontally or vertically).

This property is exposed to the API.

◆ Speed

float uLua.PaddleGame.Ball.Speed
getset

Access/set the speed of the ball.

This property is exposed to the API.

◆ StartingPosition

Vector2 uLua.PaddleGame.Ball.StartingPosition
getset

Access/set the starting position of the ball.

This property is exposed to the API.