CoriEngine
Loading...
Searching...
No Matches
Cori::World::System Class Reference

System part of ECS. More...

#include <System.hpp>

Inheritance diagram for Cori::World::System:
Collaboration diagram for Cori::World::System:

Public Member Functions

virtual ~System ()=default
 System (const System &)=delete
Systemoperator= (const System &)=delete
 System (System &&)=delete
Systemoperator= (System &&)=delete
virtual void OnUpdate (Core::GameTimer &gameTimer)
virtual void OnTickUpdate (Core::GameTimer &gameTimer)
virtual void OnImGuiRender (Core::GameTimer &gameTimer)

Protected Member Functions

 System ()=default

Protected Attributes

SceneHandle m_Owner { nullptr }

Detailed Description

System part of ECS.

Systems are a crucial part of the world and scene, I'm not going to describe what systems are in an ECS scope, you can google that.
In Cori, you can register, unregister systems for the scene, a scene can only have one instance of a particular system.
Systems can have a specific priority to them, that way you can control what systems are updated first.
To define a system you need to:
1: Derive from this class.
2: Create a method 'Create' that can take any amount of arguments and returns a bool. If 'Create' returns false the system will not be registered for the scene.
3: A static public member of type 'SystemPriority' named 'Priority'

Warning
You should put all your initialization code into the 'Create' method, because m_Owner (SceneHandle) is only valid after the constructor has run.

Definition at line 22 of file System.hpp.

Constructor & Destructor Documentation

◆ ~System()

virtual Cori::World::System::~System ( )
virtualdefault

◆ System() [1/3]

Cori::World::System::System ( const System & )
delete
Here is the call graph for this function:

◆ System() [2/3]

Cori::World::System::System ( System && )
delete
Here is the call graph for this function:

◆ System() [3/3]

Cori::World::System::System ( )
protecteddefault

Member Function Documentation

◆ OnImGuiRender()

virtual void Cori::World::System::OnImGuiRender ( Core::GameTimer & gameTimer)
inlinevirtual

Definition at line 35 of file System.hpp.

◆ OnTickUpdate()

virtual void Cori::World::System::OnTickUpdate ( Core::GameTimer & gameTimer)
inlinevirtual

◆ OnUpdate()

virtual void Cori::World::System::OnUpdate ( Core::GameTimer & gameTimer)
inlinevirtual

Reimplemented in Cori::World::Systems::Transform.

Definition at line 31 of file System.hpp.

◆ operator=() [1/2]

System & Cori::World::System::operator= ( const System & )
delete
Here is the call graph for this function:

◆ operator=() [2/2]

System & Cori::World::System::operator= ( System && )
delete
Here is the call graph for this function:

Member Data Documentation

◆ m_Owner

SceneHandle Cori::World::System::m_Owner { nullptr }
protected

Definition at line 38 of file System.hpp.


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