Acheron
Loading...
Searching...
No Matches
acheron::ecs::EntityManager Class Reference

Manages every entity. More...

#include <entity.hpp>

Public Member Functions

Entity Spawn ()
 Spawns an entity.
void Despawn (Entity entity)
 Despawn(destroy) an entity.
void SetSignature (Entity entity, Signature signature)
 Sets the signature of an entity.
Signature GetSignature (Entity entity)
 Gets the signature for an entity.

Public Attributes

std::unordered_map< Entity, Signature > signatures
 Map for entities and their associated signature.

Detailed Description

Manages every entity.

Member Function Documentation

◆ Despawn()

void EntityManager::Despawn ( Entity entity)

Despawn(destroy) an entity.

Parameters
entityEntity to despawn
Exceptions
AssertionFail if the entity doesnt exist

◆ GetSignature()

Signature EntityManager::GetSignature ( Entity entity)

Gets the signature for an entity.

Parameters
entityThe entity to get the signature from
Returns
The signature for the entity passed

◆ SetSignature()

void EntityManager::SetSignature ( Entity entity,
Signature signature )

Sets the signature of an entity.

Sets the signature of the components to be associated with the entity Usually this is called internally by World

Parameters
entityThe entity to set the signature of
signatureThe new signature to apply to the entity

◆ Spawn()

Entity EntityManager::Spawn ( )

Spawns an entity.

Returns
An Entity ID associated with the entity just spawned

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