Nui Engine
A game engine framework
Loading...
Searching...
No Matches
RenderSystem.h
1#pragma once
2#include "Core/Engine/Components/TransformComponent.h"
3#include "Core/Engine/ECS/ECS.h"
4
5namespace Nui::Systems
6{
7 namespace Events
8 {
12 struct EndFrame {};
13 }
14
16 NUI_EVENT_SUBSCRIBER(Events::EndFrame)
17 {
18 public:
23 virtual void OnInit(ECS::Context* ctx) override;
24
30 virtual void OnUpdate(ECS::Context* ctx, const F64 dt) override;
31
36 virtual void OnShutdown(ECS::Context* ctx) override;
37
38 private:
45 NUI_DECLARE_EVENT(Events::EndFrame);
46
50 void OnEndFrame();
51 };
52}
The ECS context class manages entities, systems, and events in the ECS framework.
Definition Context.h:17
Base class for all ECS systems.
Definition System.h:10
Definition RenderSystem.h:17
virtual void OnUpdate(ECS::Context *ctx, const F64 dt) override
Updates the system.
Definition RenderSystem.cpp:17
virtual void OnInit(ECS::Context *ctx) override
Initializes the system and subscribes to events.
Definition RenderSystem.cpp:7
virtual void OnShutdown(ECS::Context *ctx) override
Shuts down the system and unsubscribes from events.
Definition RenderSystem.cpp:21
Event that is triggered at the end of the frame.
Definition RenderSystem.h:12