uLua v3.1.0
A Lua Modding Framework for Unity.
uLua.PaddleGame.Ball Class Reference

Ball object wrapper class. 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.
 

Properties

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

Detailed Description

Ball object wrapper class.

When this object is exposed to Lua, all public members of this class will be available to use.

Member Function Documentation

◆ AdjustAngle()

void uLua.PaddleGame.Ball.AdjustAngle ( float  degrees)

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

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

Property Documentation

◆ StartingPosition

Vector2 uLua.PaddleGame.Ball.StartingPosition
getset

Access/set the starting position of the ball.

This property is exposed to the API.