|
R-Type
Distributed multiplayer game engine in C++
|
ECS system that executes Lua scripts for entities. More...
#include <LuaSystemAdapter.hpp>


Public Member Functions | |
| LuaSystemAdapter (LuaEngine *luaEngine, ecs::wrapper::ECSWorld *world) | |
| Constructor with LuaEngine and ECSWorld. | |
| void | update (ecs::Registry ®istry, float deltaTime) override |
| Updates all Lua scripts for entities. | |
| ecs::ComponentMask | getComponentMask () const override |
| Get component mask for this system. | |
Public Member Functions inherited from ecs::ISystem | |
| virtual | ~ISystem ()=default |
| Virtual destructor. | |
Private Attributes | |
| LuaEngine * | _luaEngine |
| ecs::wrapper::ECSWorld * | _world |
ECS system that executes Lua scripts for entities.
Integrates the Lua scripting engine with the ECS system, executing scripts attached to entities via LuaScript components. Requires LuaScript component.
Definition at line 24 of file LuaSystemAdapter.hpp.
| scripting::LuaSystemAdapter::LuaSystemAdapter | ( | LuaEngine * | luaEngine, |
| ecs::wrapper::ECSWorld * | world | ||
| ) |
Constructor with LuaEngine and ECSWorld.
| luaEngine | Pointer to the Lua engine |
| world | Pointer to the ECS world wrapper |
Definition at line 14 of file LuaSystemAdapter.cpp.
References LOG_ERROR.
|
overridevirtual |
Get component mask for this system.
Implements ecs::ISystem.
Definition at line 80 of file LuaSystemAdapter.cpp.
Referenced by update().
|
overridevirtual |
Updates all Lua scripts for entities.
Overrides the base ISystem to properly integrate with LuaEngine.
| registry | Reference to the ECS registry |
| deltaTime | Time elapsed since last frame |
Implements ecs::ISystem.
Definition at line 24 of file LuaSystemAdapter.cpp.
References _luaEngine, _world, scripting::LuaEngine::cleanupEntity(), scripting::LuaEngine::executeUpdate(), ecs::Registry::getComponent(), getComponentMask(), ecs::Registry::getEntitiesWithMask(), ecs::wrapper::ECSWorld::getEntity(), ecs::LuaScript::getScriptPath(), ecs::Registry::hasComponent(), ecs::wrapper::Entity::isValid(), LOG_ERROR, and LOG_WARNING.

|
private |
Definition at line 52 of file LuaSystemAdapter.hpp.
Referenced by update().
|
private |
Definition at line 53 of file LuaSystemAdapter.hpp.
Referenced by update().