|
Engine
Raylib based game framework
|
Manages execution and order of systems. More...
#include <SystemManager.h>
Public Member Functions | |
| void | Update (const float deltaT) |
| Updates all systems in order. | |
| void | Draw () |
| Renders all systems in order. | |
| template<typename T , typename... Args> requires std::is_base_of_v<System, T> | |
| T & | AddSystem (const u32 priority=1, Args &&... args) |
| Adds a system to the manager. | |
|
template<typename T > requires std::is_base_of_v<System, T> | |
| void | RemoveSystem () |
| template<typename T > requires std::is_base_of_v<System, T> | |
| T * | GetSystem () |
| Gets a system pointer. | |
| void | ClearSystems () |
| Clears all systems. | |
Manages execution and order of systems.
Systems are updated and rendered in order. Lower priority values go first. Systems update and render before scenes.
|
inline |
Adds a system to the manager.
The system is constructed in within the manager and owned by it. Systems must derive from the System base class..
| T | System type |
| Args | T Constructor argument types |
| priority | Execution priority (lower executes first) |
| args | System constructor arguments |
Usage:
|
inline |
Gets a system pointer.
Return a nullptr if the system does not exist.
| T | System type |
| void SystemManager::Update | ( | const float | deltaT | ) |
Updates all systems in order.
| deltaT | Duration of previous frame |