uLua Paddle Game v2.2.0
A paddle game for Unity made as an example use of the uLua toolkit.
|
Class which keeps track of various game settings. More...
Public Member Functions | |
Settings (string Name, LuaMonoBehaviour Context=null, bool ExposeOnInit=true, bool EnableObjectScript=false) | |
Public constructor. More... | |
void | AddScore (int Number) |
Increments player score. More... | |
void | AddLevel (int Number=1) |
Increments the game level. More... | |
void | AddLife (int Number=1) |
Increments player lives. More... | |
void | Reset () |
Resets the settings and updates the high score. More... | |
Properties | |
float | TotalSpeedIncrement [get] |
The total speed increment based on the current level. More... | |
Class which keeps track of various game settings.
All public members of this class are exposed to Lua. Inherits from uLua.ExposedClass
.
|
inline |
Public constructor.
Name | Sets the name of the object exposed to Lua. |
Context | Sets the context of the object exposed to Lua. |
ExposeOnInit | (Optional) Enables/disables the automatic exposure of this object to Lua. |
EnableObjectScript | (Optional) Enables/disables the execution of a Lua script for this object after it is exposed. |
|
inline |
Increments the game level.
This method is exposed to the API. Invokes a UIUpdate event.
Number | (Optional) The number of levels to add. Defaults to 1. |
|
inline |
Increments player lives.
This method is exposed to the API. Invokes a UIUpdate event.
Number | (Optional) The number of lives to add. Defaults to 1. |
|
inline |
Increments player score.
This method is exposed to the API. Invokes a UIUpdate event.
Number | The number to be added to the score. |
|
inline |
Resets the settings and updates the high score.
This method is exposed to the API. Invokes a UIUpdate event.
|
get |
The total speed increment based on the current level.
This property is exposed to the API.