Magicavoxel glass
The registry is a hierarchical node structure and can store a value in each node (parent nodes can also have a value). The registry, but it can also be used as way for scripts to communicate with The engine exposes a lot of internal information through The Teardown engine uses a global key/value-pair registry that scriptsĬan read and write. GetVersion HasVersion GetTime GetTimeStep InputLastPressedKey InputPressed InputReleased InputDown InputValue SetValue PauseMenuButton StartLevel SetPaused Restart Menu Registry Only valid in InputValue.Ĭamera y movement, scaled by sensitivity. Only valid in InputValue.Ĭamera x movement, scaled by sensitivity. General functions that control the operation and flow of the script. GetIntParam GetFloatParam GetBoolParam GetStringParam Script control Variable in or outside the init function. While these parameters canīe read at any time in the script, it's recommended to copy them to a global Various options and parameters of the script. Input to a specific instance of the script and can be used to configure Scripts can have parameters defined in the level XML file. Ui functions can only be used from this callback. Depending on frame rate it might not be called at all for a particular frame.Ĭalled when the 2D overlay is being draw, after the scene but before the standard HUD. Time step is always 0.0166667 (60 updates per second).
#Magicavoxel glass update#
The time step is variable but always between 0.0 and 0.0333333Ĭalled at a fixed update rate, but at the most two times per frame. Each script has four callback functions.Ĭalled exactly once per frame. Vector types are representedĪs plain Lua tables, and so on. Handles to objects are plain Lua numbers. The Teardown API uses only native lua types.
In the engine, for communication between scripts and as a way to save persistent data. The registry is a database of hierarchical global variables that is used both internally
#Magicavoxel glass manual#
The Lua 5.1 reference manual can be found here.Įach Teardown script runs in its own Lua context and can only interact with the engine and other scripts Teardown uses Lua version 5.1 as scripting language. Teardown scripting API (1.1.0) Teardown scripting