Skip to content

SFME::ECS

Sztergbaum Roman edited this page Feb 11, 2018 · 73 revisions

Welcome to the page of the SFME::ECS module

Modules contents

A complete example can be found here

Include hierarchy can be found here

How works the System

SFME systems are separated into different types:

  • PreUpdate -> Called at each loop turn before logical systems (for example ProcessInput, ProcessNetwork)
  • LogicUpdate -> Looped as long as it is allowed (for example GameLogic, Physics, Movement)
  • PostUpdate -> Called at the end of the LogicUpdate (for example Rendering, Interpolation)

This class will manage the systems of the entity component system. You will be able to add, remove, retrieve or delete systems through it.

The class is templated on the entity manager and she is a receiver.

Class Signature

template <typename EntityManager>
class SystemManager final : public sfme::mediator::Receiver<SystemManager<EntityManager>>;

Constructor

SystemManager(sfme::mediator::EventManager &evtMgr, EntityManager &ettMgr) noexcept;
Parameters
  • evtMgr The event manager will be provided to the system when it is created.
  • ettMgr The entity manager will be provided to the system when it is created.

Member function : update

void update() noexcept;
Notes

This is the function that will update your systems.

Include Hierarchy

Clone this wiki locally