galaxy
1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
ScriptSystem.cpp
Go to the documentation of this file.
1
7
8
#include "
galaxy/components/Script.hpp
"
9
#include "
galaxy/flags/Disabled.hpp
"
10
#include "
galaxy/scene/Scene.hpp
"
11
12
#include "
ScriptSystem.hpp
"
13
14
namespace
galaxy
15
{
16
namespace
systems
17
{
18
ScriptSystem::ScriptSystem
()
19
{
20
}
21
22
ScriptSystem::~ScriptSystem
()
23
{
24
}
25
26
void
ScriptSystem::update
(entt::registry& registry)
27
{
28
const
auto
group = registry.view<
components::Script
>(entt::exclude<flags::Disabled>);
29
for
(
auto
&& [entity, script] : group.each())
30
{
31
if
(script.m_update.valid())
32
{
33
script.m_update(script.m_self);
34
}
35
}
36
}
37
}
// namespace systems
38
}
// namespace galaxy
Disabled.hpp
Scene.hpp
ScriptSystem.hpp
galaxy::components::Script
High level abstraction of a lua script.
Definition
Script.hpp:31
galaxy::systems::ScriptSystem::ScriptSystem
ScriptSystem()
Constructor.
Definition
ScriptSystem.cpp:18
galaxy::systems::ScriptSystem::update
void update(entt::registry ®istry) override
Abstract implementation for updating the system. Use the manager to retreive your components.
Definition
ScriptSystem.cpp:26
galaxy::systems::ScriptSystem::~ScriptSystem
virtual ~ScriptSystem()
Destructor.
Definition
ScriptSystem.cpp:22
Script.hpp
galaxy
Timer.hpp galaxy.
Definition
Async.hpp:17
galaxy
src
galaxy
systems
ScriptSystem.cpp
Generated on Sat Mar 1 2025 14:49:36 for galaxy by
1.12.0