Yet Another Game Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
yage::EntityManager Class Reference

Has to keep track of all the different entities and their current state. More...

#include <entity.h>

Public Member Functions

Entity create_entity ()
 
EntityManagerdelete_entity (Entity entity)
 
bool is_valid (Entity entity) const
 
EntityManageradd_component (Entity entity, std::unique_ptr< BaseComponent > &&component)
 
template<typename T >
EntityManagereach (std::function< void(T &)> update)
 

Detailed Description

Has to keep track of all the different entities and their current state.

The key actions on an Entity are: deleting, creating.

Member Function Documentation

EntityManager & yage::EntityManager::add_component ( Entity  entity,
std::unique_ptr< BaseComponent > &&  component 
)
Entity yage::EntityManager::create_entity ( )
EntityManager & yage::EntityManager::delete_entity ( Entity  entity)
template<typename T >
EntityManager & yage::EntityManager::each ( std::function< void(T &)>  update)
bool yage::EntityManager::is_valid ( Entity  entity) const

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