Nui Engine
A game engine framework
Loading...
Searching...
No Matches
System.h
1
#pragma once
2
#include "Core/Engine/ECS/Common.h"
3
4
namespace
Nui::ECS
5
{
9
class
SystemBase
10
{
11
public
:
15
virtual
~SystemBase
() =
default
;
16
22
virtual
void
OnInit
(
Context
* ctx) {}
23
29
virtual
void
OnUpdate
(
Context
* ctx,
const
F64 dt) {}
30
36
virtual
void
OnShutdown
(
Context
* ctx) {}
37
42
bool
IsEnabled
() const noexcept {
return
m_enabled; }
43
48
void
SetIsEnabled
(
bool
enabled)
noexcept
{ m_enabled = enabled; }
49
50
private
:
54
bool
m_enabled{
true
};
55
};
56
}
Nui::ECS::Context
The ECS context class manages entities, systems, and events in the ECS framework.
Definition
Context.h:17
Nui::ECS::SystemBase
Base class for all ECS systems.
Definition
System.h:10
Nui::ECS::SystemBase::IsEnabled
bool IsEnabled() const noexcept
Check if the system is enabled.
Definition
System.h:42
Nui::ECS::SystemBase::OnUpdate
virtual void OnUpdate(Context *ctx, const F64 dt)
Called when the system is updated (every frame)
Definition
System.h:29
Nui::ECS::SystemBase::OnInit
virtual void OnInit(Context *ctx)
Called when the system is initialized.
Definition
System.h:22
Nui::ECS::SystemBase::~SystemBase
virtual ~SystemBase()=default
Default virtual destructor.
Nui::ECS::SystemBase::SetIsEnabled
void SetIsEnabled(bool enabled) noexcept
Set if the system is enabled.
Definition
System.h:48
Nui::ECS::SystemBase::OnShutdown
virtual void OnShutdown(Context *ctx)
Called when the system is shutdown.
Definition
System.h:36
Engine
Core
Engine
ECS
System.h
Generated by
1.11.0