Aegis2D
Modular C++26 2D game engine for networked games
Loading...
Searching...
No Matches
aegis2d::ecs::ISystem Class Referenceabstract

Game logic run on the registry once per tick (movement, collisions, spawns...). More...

#include <aegis2d/ecs/system.hpp>

Inheritance diagram for aegis2d::ecs::ISystem:
aegis2d::ecs::FunctionSystem

Public Member Functions

 ISystem ()=default
 
 ISystem (const ISystem &)=delete
 
ISystem & operator= (const ISystem &)=delete
 
 ISystem (ISystem &&)=delete
 
ISystem & operator= (ISystem &&)=delete
 
virtual ~ISystem ()
 Releases the system's own state.
 
virtual void update (Registry &registry, const Tick &tick)=0
 Runs the system for one tick.
 

Detailed Description

Game logic run on the registry once per tick (movement, collisions, spawns...).

A system owns no entity: it reads and writes components through the registry, usually with views. It may keep its own state between ticks (a spawn timer, a random generator), so client and server each register the systems they need in their Scheduler. Small stateless systems can be plain functions instead (FunctionSystem).

Constructor & Destructor Documentation

◆ ISystem() [1/3]

aegis2d::ecs::ISystem::ISystem ( )
default

◆ ISystem() [2/3]

aegis2d::ecs::ISystem::ISystem ( const ISystem &  )
delete

◆ ISystem() [3/3]

aegis2d::ecs::ISystem::ISystem ( ISystem &&  )
delete

◆ ~ISystem()

virtual aegis2d::ecs::ISystem::~ISystem ( )
virtual

Releases the system's own state.

Member Function Documentation

◆ operator=() [1/2]

ISystem & aegis2d::ecs::ISystem::operator= ( const ISystem &  )
delete

◆ operator=() [2/2]

ISystem & aegis2d::ecs::ISystem::operator= ( ISystem &&  )
delete

◆ update()

virtual void aegis2d::ecs::ISystem::update ( Registry &  registry,
const Tick &  tick 
)
pure virtual

Runs the system for one tick.

Parameters
registryWorld the system works on.
tickStep duration and tick number.

Implemented in aegis2d::ecs::FunctionSystem.


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