tec::LuaSystem
#include <lua-system.hpp>
Inherits from tec::CommandQueue< LuaSystem >, tec::EventQueue< EntityCreated >, tec::EventQueue< EntityDestroyed >, tec::EventQueue< ChatCommandEvent >
Public Functions
| Name | |
|---|---|
| LuaSystem() | |
| void | Update(const double delta) |
| void | ProcessEvents() |
| virtual void | On(eid , std::shared_ptr< EntityCreated > data) override |
| virtual void | On(eid entity_id, std::shared_ptr< EntityDestroyed > data) override |
| virtual void | On(eid , std::shared_ptr< ChatCommandEvent > data) override |
| void | ExecuteString(std::string script_string) |
| std::shared_ptr< LuaScript > | LoadFile(Path filepath) |
| sol::state & | GetGlobalState() |
| template <typename... Args> void |
CallFunctions(std::string function_name, Args &&... args) |
Additional inherited members
Public Functions inherited from tec::CommandQueue< LuaSystem >
| Name | |
|---|---|
| CommandQueue() | |
| ~CommandQueue() | |
| void | ProcessCommandQueue() |
| void | QueueCommand(Command< T > && command) |
| void | QueueCommand(std::function< void(T *)> && command) |
Protected Attributes inherited from tec::CommandQueue< LuaSystem >
| Name | |
|---|---|
| std::atomic< std::queue< Command< T > > * > | global_command_queue |
| std::queue< Command< T > > * | local_queue |
Public Functions inherited from tec::EventQueue< EntityCreated >
| Name | |
|---|---|
| EventQueue() | |
| EventQueue(eid entity_id) | |
| virtual | ~EventQueue() |
| void | ProcessEventQueue() |
| void | QueueEvent(Event< T > && e) |
Protected Attributes inherited from tec::EventQueue< EntityCreated >
| Name | |
|---|---|
| Queue< Event< T > > * | read_event_queue |
| std::atomic< Queue< Event< T > > * > | write_event_queue |
Public Functions inherited from tec::EventQueue< EntityDestroyed >
| Name | |
|---|---|
| EventQueue() | |
| EventQueue(eid entity_id) | |
| virtual | ~EventQueue() |
| void | ProcessEventQueue() |
| void | QueueEvent(Event< T > && e) |
Protected Attributes inherited from tec::EventQueue< EntityDestroyed >
| Name | |
|---|---|
| Queue< Event< T > > * | read_event_queue |
| std::atomic< Queue< Event< T > > * > | write_event_queue |
Public Functions inherited from tec::EventQueue< ChatCommandEvent >
| Name | |
|---|---|
| EventQueue() | |
| EventQueue(eid entity_id) | |
| virtual | ~EventQueue() |
| void | ProcessEventQueue() |
| void | QueueEvent(Event< T > && e) |
Protected Attributes inherited from tec::EventQueue< ChatCommandEvent >
| Name | |
|---|---|
| Queue< Event< T > > * | read_event_queue |
| std::atomic< Queue< Event< T > > * > | write_event_queue |
Public Functions Documentation
function LuaSystem
LuaSystem()
function Update
void Update(
const double delta
)
function ProcessEvents
void ProcessEvents()
function On
virtual void On(
eid ,
std::shared_ptr< EntityCreated > data
) override
Reimplements: tec::EventQueue::On
function On
virtual void On(
eid entity_id,
std::shared_ptr< EntityDestroyed > data
) override
Reimplements: tec::EventQueue::On
function On
virtual void On(
eid ,
std::shared_ptr< ChatCommandEvent > data
) override
Reimplements: tec::EventQueue::On
function ExecuteString
void ExecuteString(
std::string script_string
)
function LoadFile
std::shared_ptr< LuaScript > LoadFile(
Path filepath
)
function GetGlobalState
inline sol::state & GetGlobalState()
function CallFunctions
template <typename... Args>
inline void CallFunctions(
std::string function_name,
Args &&... args
)
Updated on 2022-07-24 at 19:27:35 +0000