Manages all entities and their groups within the game. More...
#include <ECS.h>

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. | |
| Entity & | addEntity (std::string id) |
| Creates a new entity and adds it to the manager. | |
| void | destroyAll () |
| Destroys all entities managed by this object. | |
Manages all entities and their groups within the game.
| Entity & Manager::addEntity | ( | std::string | id | ) |
Creates a new entity and adds it to the manager.
| id | The string identifier for the new entity. |

Adds an entity to a specified group.
| memEntity | The entity to add. |
| memGroup | The group to add the entity to. |


| std::vector< Entity * > & Manager::getGroupMembers | ( | GroupID | memGroup | ) |
Retrieves all entities belonging to a specific group.
| memGroup | The group whose members are to be retrieved. |
