|
GearBlocks
The GearBlocks Lua scripting API
|
The input system. More...
Static Public Member Functions | |
| static float | GetAxis (string axisName) |
| Get the value of an input axis. | |
| static bool | GetKey (string keyName) |
| Is a key held? | |
| static bool | GetKeyDown (string keyName) |
| Was a key pressed? | |
| static bool | GetKeyUp (string keyName) |
| Was a key released? | |
| static bool | GetMouseButton (int button) |
| Is a mouse button held? | |
| static bool | GetMouseButtonDown (int button) |
| Was a mouse button pressed? | |
| static bool | GetMouseButtonUp (int button) |
| Was a mouse button released? | |
Properties | |
| static bool | AnyKey [get] |
| Is any key held? | |
| static bool | AnyKeyDown [get] |
| Was any key pressed? | |
| static Vector3Proxy | MousePosition [get] |
| The mouse position. | |
The input system.
Available in Lua via the "Input" global, for example:
|
static |
Get the value of an input axis.
| axisName | The name of the axis to check. |
Valid axis names are:
A full list of available axis names can be found by typing LogAxisNames in the debug console.
|
static |
Is a key held?
| keyName | The name of the key to check. |
Valid key names are:
A full list of available key names can be found by typing LogKeyNames in the debug console.
true if the key is currently held; otherwise, false.
|
static |
Was a key pressed?
| keyName | The name of the key to check. |
See GetKey for key names.
true if the key was pressed this frame; otherwise, false.
|
static |
Was a key released?
| keyName | The name of the key to check. |
See GetKey for key names.
true if the key was released this frame; otherwise, false.
|
static |
Is a mouse button held?
| button | The index of the button to check. |
Valid indices are between 0 and 6.
true if the button is currently held; otherwise, false.
|
static |
Was a mouse button pressed?
| button | The index of the button to check. |
Valid indices are between 0 and 6.
true if the button was pressed this frame; otherwise, false.
|
static |
Was a mouse button released?
| button | The index of the button to check. |
Valid indices are between 0 and 6.
true if the button was released this frame; otherwise, false.
|
staticget |
Is any key held?
true if any key is currently held; otherwise, false.
|
staticget |
Was any key pressed?
true if any key was pressed this frame; otherwise, false.
|
staticget |
The mouse position.
The current mouse position in pixel coordinates.