 |
BARE2D
|
|
Go to the documentation of this file.
13 class LuaScriptContextWrapper;
30 void init(std::string luaModulesPath);
This class essentially just collects all of the scripts that need to be run from all the various end-...
void init(std::string luaModulesPath)
Initializes the LuaScriptEngine - loads basic modules etc.
lua_State * m_masterState
static void addValueToRegistry(lua_State *L, T *value, std::string key)
Adds a value to the Lua registry - this lets any C/C++ code use the value stored in the state (it is ...
void registerCFunction(lua_CFunction function, std::string name)
Adds a Lua C Function. This is a function which can be called from inside a Lua script,...
lua_State * getMasterState()
Returns a pointer to the master state.
LuaScriptContextWrapper * createLuaContext(LuaScript *script)
Creates a LuaScriptContextWrapper using the data from script.
void update()
Processes all scripts from the LuaScriptQueue and updates all running scripts. That's pretty much it!
static T * getValueFromRegistry(lua_State *L, std::string key)
This is the basic Lua script wrapper - it is what the end-user will create and add to the queue....
void registerModule(std::string filename)
Loads and registers (read: runs) the module located at the given file.