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

Implements controls for paddle objects. More...

Public Member Functions

void Reset ()
 Resets the position of the paddle to its starting position. More...
 
void UpdateContactPoint (ContactPoint2D Contact)
 Updates the ContactPoint vector based on a detected collision. More...
 

Public Attributes

float Speed = 0f
 Movement speed of the paddle object.
 
Vector2 StartingPosition = Vector2.zero
 Starting position of the paddle object.
 
Vector2 ContactPoint = Vector2.zero
 Last known contact point of the ball relative to the center of the paddle object.
 

Properties

float Scale [get, set]
 Access/set the scale of the Paddle object.
 

Detailed Description

Implements controls for paddle objects.

Member Function Documentation

◆ Reset()

void uLua.PaddleGame.PaddleController.Reset ( )
inline

Resets the position of the paddle to its starting position.

This method is exposed to the API by the uLua.PaddleGame.Paddle class.

◆ UpdateContactPoint()

void uLua.PaddleGame.PaddleController.UpdateContactPoint ( ContactPoint2D  Contact)
inline

Updates the ContactPoint vector based on a detected collision.

Parameters
ContactThe ContactPoint2D of the collision with the ball object.