Nox Engine
 
Loading...
Searching...
No Matches
Manager Struct Reference

Manages all entities and their groups within the game. More...

#include <ECS.h>

Collaboration diagram for Manager:
Collaboration graph

Public Member Functions

void update ()
 Updates all active entities.
 
void draw ()
 Draws all active entities.
 
void refreshGroups ()
 Re-evaluates group memberships for all entities.
 
void refresh ()
 Removes disabled entities and re-evaluates groups.
 
void addToGroup (Entity *memEntity, GroupID memGroup)
 Adds an entity to a specified group.
 
std::vector< Entity * > & getGroupMembers (GroupID memGroup)
 Retrieves all entities belonging to a specific group.
 
EntityaddEntity (std::string id)
 Creates a new entity and adds it to the manager.
 
void destroyAll ()
 Destroys all entities managed by this object.
 

Detailed Description

Manages all entities and their groups within the game.

Member Function Documentation

◆ addEntity()

Entity & Manager::addEntity ( std::string  id)

Creates a new entity and adds it to the manager.

Parameters
idThe string identifier for the new entity.
Returns
A reference to the newly created entity.
Here is the call graph for this function:

◆ addToGroup()

void Manager::addToGroup ( Entity memEntity,
GroupID  memGroup 
)

Adds an entity to a specified group.

Parameters
memEntityThe entity to add.
memGroupThe group to add the entity to.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getGroupMembers()

std::vector< Entity * > & Manager::getGroupMembers ( GroupID  memGroup)

Retrieves all entities belonging to a specific group.

Parameters
memGroupThe group whose members are to be retrieved.
Returns
A vector of pointers to the entities in the group.
Here is the call graph for this function:

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