|
LPCGame
A Simple 2d Game Engine
|
A class to enable lua scripts to load various modules. More...
#include <luascript.h>
Public Member Functions | |
| LuaScript (std::string script) | |
| void | OpenScript (const std::string &script) |
| void | Close () |
| Close the script. | |
| lua_State * | Get () |
| std::string | File () const |
| Get the script filename. | |
| bool | Open () const |
| Check if there's a script open. | |
| template<class ReturnType > | |
| auto | CallFunction (std::string function, std::vector< LuaC::LuaParam * > args=std::vector< LuaC::LuaParam * >()) -> decltype(ReturnType::Retrieve(mL)) |
| void | CallFunction (std::string function, std::vector< LuaC::LuaParam * > args=std::vector< LuaC::LuaParam * >()) |
A class to enable lua scripts to load various modules.
ModuleManager enables Lua scripts to import other necessary modules
| LuaScript::LuaScript | ( | std::string | script | ) |
Create the LuaScript instance and open a script
| script | The script to open |
|
inline |
Call a function on the Lua state and pass some arguments to it
| function | Name of the function to be called |
| args | Vector of arguments to be passed |
| lua_State * LuaScript::Get | ( | ) |
Get the lua_State pointer to use for calling functions/etc.
| void LuaScript::OpenScript | ( | const std::string & | script | ) |
Open the desired Lua script to be run as the entity's behavior script
| script | The script file to open |