Nui Engine
A game engine framework
Loading...
Searching...
No Matches
Nui::ECS::SystemBase Class Reference

Base class for all ECS systems. More...

#include <System.h>

Inheritance diagram for Nui::ECS::SystemBase:
Nui::Systems::RenderSystem Nui::Systems::TransformSystem TestSystem

Public Member Functions

virtual ~SystemBase ()=default
 Default virtual destructor.
 
virtual void OnInit (Context *ctx)
 Called when the system is initialized.
 
virtual void OnUpdate (Context *ctx, const F64 dt)
 Called when the system is updated (every frame)
 
virtual void OnShutdown (Context *ctx)
 Called when the system is shutdown.
 
bool IsEnabled () const noexcept
 Check if the system is enabled.
 
void SetIsEnabled (bool enabled) noexcept
 Set if the system is enabled.
 

Detailed Description

Base class for all ECS systems.

Member Function Documentation

◆ IsEnabled()

bool Nui::ECS::SystemBase::IsEnabled ( ) const
inlinenoexcept

Check if the system is enabled.

Returns
True if the system is enabled

◆ OnInit()

virtual void Nui::ECS::SystemBase::OnInit ( Context * ctx)
inlinevirtual

Called when the system is initialized.

Note
Subscribe to event callbacks here
Parameters
ctxPointer to the ECS context

Reimplemented in Nui::Systems::RenderSystem, Nui::Systems::TransformSystem, and TestSystem.

◆ OnShutdown()

virtual void Nui::ECS::SystemBase::OnShutdown ( Context * ctx)
inlinevirtual

Called when the system is shutdown.

Note
Unsubscribe from event callbacks here
Parameters
ctxPointer to the ECS context

Reimplemented in Nui::Systems::RenderSystem, Nui::Systems::TransformSystem, and TestSystem.

◆ OnUpdate()

virtual void Nui::ECS::SystemBase::OnUpdate ( Context * ctx,
const F64 dt )
inlinevirtual

Called when the system is updated (every frame)

Parameters
ctxPointer to the ECS context
dtTime since last frame

Reimplemented in Nui::Systems::RenderSystem, Nui::Systems::TransformSystem, and TestSystem.

◆ SetIsEnabled()

void Nui::ECS::SystemBase::SetIsEnabled ( bool enabled)
inlinenoexcept

Set if the system is enabled.

Parameters
enabledTrue if the system is enabled

The documentation for this class was generated from the following file: