16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 19:19:19 +02:00
Files
maszyna/entitysystem/systems/SystemManager.cpp
2026-05-24 21:48:05 +02:00

39 lines
748 B
C++

//
// Created by Daniu
//
#include "SystemManager.h"
#include "entitysystem/systems/BaseSystem.h"
#include "entitysystem/ECWorld.h"
#include "utilities/Logs.h"
SystemManager::~SystemManager() = default;
void SystemManager::Create(ECWorld& world)
{
WriteLog("[SystemManager] Creating systems");
for (auto& system : m_systems){
system->OnCreate(world);
}
}
void SystemManager::Destroy(ECWorld& world)
{
WriteLog("[SystemManager] Destroying systems");
for (auto& system : m_systems)
system->OnDestroy(world);
}
void SystemManager::Update(ECWorld& world, float dt)
{
for (auto& system : m_systems)
system->Update(world, dt);
}
void SystemManager::Render(ECWorld& world)
{
for (auto& system : m_systems)
system->Render(world);
}