Yet Another Game Engine
|
Has to keep track of all the different entities and their current state. More...
#include <entity.h>
Public Member Functions | |
Entity | create_entity () |
EntityManager & | delete_entity (Entity entity) |
bool | is_valid (Entity entity) const |
EntityManager & | add_component (Entity entity, std::unique_ptr< BaseComponent > &&component) |
template<typename T > | |
EntityManager & | each (std::function< void(T &)> update) |
Has to keep track of all the different entities and their current state.
The key actions on an Entity are: deleting, creating.
EntityManager & yage::EntityManager::add_component | ( | Entity | entity, |
std::unique_ptr< BaseComponent > && | component | ||
) |
Entity yage::EntityManager::create_entity | ( | ) |
EntityManager & yage::EntityManager::delete_entity | ( | Entity | entity | ) |
EntityManager & yage::EntityManager::each | ( | std::function< void(T &)> | update | ) |
bool yage::EntityManager::is_valid | ( | Entity | entity | ) | const |