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
11
12#include "ScriptSystem.hpp"
13
14namespace galaxy
15{
16 namespace systems
17 {
21
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
High level abstraction of a lua script.
Definition Script.hpp:31
void update(entt::registry &registry) override
Abstract implementation for updating the system. Use the manager to retreive your components.
virtual ~ScriptSystem()
Destructor.
Timer.hpp galaxy.
Definition Async.hpp:17