![]() |
galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
|
A basic script is usually only run once or run when something specific happens. More...
#include <Script.hpp>
Public Member Functions | |
Script () | |
Constructor. | |
Script (const std::string &file) | |
Argument Constructor. | |
~Script () | |
Destructor. | |
bool | load (const std::string &file) |
Load a script. | |
bool | run () |
Run a lua script. | |
sol::protected_function_result | run_and_return () |
Run a lua script and get a return value. | |
Private Attributes | |
sol::load_result | m_script |
Script loaded into sol3 memory. | |
bool | m_loaded |
Flag to make sure script is loaded. | |
A basic script is usually only run once or run when something specific happens.
Definition at line 20 of file Script.hpp.
galaxy::lua::Script::Script | ( | ) |
Constructor.
Definition at line 18 of file Script.cpp.
galaxy::lua::Script::Script | ( | const std::string & | file | ) |
Argument Constructor.
file | File in VFS to load as a script. |
Definition at line 23 of file Script.cpp.
galaxy::lua::Script::~Script | ( | ) |
Destructor.
Definition at line 29 of file Script.cpp.
|
nodiscard |
Load a script.
file | File in VFS to load as a script. |
Definition at line 33 of file Script.cpp.
bool galaxy::lua::Script::run | ( | ) |
Run a lua script.
Definition at line 59 of file Script.cpp.
|
nodiscard |
Run a lua script and get a return value.
Definition at line 70 of file Script.cpp.
|
private |
Script loaded into sol3 memory.
Definition at line 68 of file Script.hpp.
|
private |
Flag to make sure script is loaded.
Definition at line 73 of file Script.hpp.