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

Implements controls for ball objects. 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...
 

Public Attributes

float Speed = 0f
 Movement speed of the ball object.
 
float Delay = 0f
 Delay (in seconds) before the ball is set in motion.
 
Vector2 StartingPosition = Vector2.zero
 Starting position of the ball object.
 

Properties

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

Detailed Description

Implements controls for ball objects.

Member Function Documentation

◆ AdjustAngle()

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

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

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

◆ Reset()

void uLua.PaddleGame.BallController.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 by the uLua.PaddleGame.Ball class.