Add Signal to ECS

- Add Signal class to ECS used to send signals/events into systems
This commit is contained in:
Thraix
2023-05-22 12:52:15 +02:00
parent 0cd35928a7
commit cd4abe6007
15 changed files with 144 additions and 23 deletions
@@ -32,6 +32,14 @@ namespace Copium
}
}
void SystemPool::Update(const Signal& signal)
{
for (auto& system : systemOrder)
{
system->Run(signal);
}
}
void SystemPool::MoveSystemAfter(const std::type_index& systemId, const std::type_index& afterSystemId)
{
auto it1 = systems.find(systemId);