ecs::World

More...

#include <World.hpp>

Public Functions

Name

void

addSystem(const std::function< void(World &)> & system)

void

pushEvent(const ecs::Event event)

getEvent() const

Public Attributes

Detailed Description

class ecs::World;

World class is used to contain all the components that are relevant to work together

Public Functions Documentation

function World

Default constructor

function runSystems

Used to operate all the systems in the world

function addSystem

Parameters:

  • system The system you want to add in the world in a constant manner

USed to add a new system into the world

function pushEvent

Parameters:

  • event The event you want to push in the world

Used to add a new event into the world

function getEvent

Return: The first event of the private stack if it exists, ecs::Event::EventType::Null otherwise

Used to get the first event of the private stack _events

function popEvent

Return: The event you just popped out of the stack if it exists, ecs::Event::EventType::Null otherwise

Used to pop the first event of the private stack _events

Public Attributes Documentation

variable registry

The registry of the world, refers to the Registry documentation to learn more about it


Updated on 2022-11-13 at 17:21:37 +0100

Last updated