ecsalt_entity (ecsalt v2.0.0)

View Source

Summary

Functions

Delete a given entity from the entity table

Get an entity and all attached components, otherwise false

List all entities in #world{}

Insert a new entity into the entity table, identified by EntityID

Types

component()

-type component() :: {term(), term()}.

entity()

-type entity() :: {term(), [component()]}.

id()

-type id() :: identifier().

world()

-opaque world()

Functions

delete(EntityID, World)

-spec delete(id(), world()) -> world().

Delete a given entity from the entity table

get(EntityID, World)

-spec get(id(), world()) -> {id(), [term()]} | false.

Get an entity and all attached components, otherwise false

list(World)

-spec list(world()) -> [{id(), [term()]}].

List all entities in #world{}

new(EntityID, World)

-spec new(id(), world()) -> world().

Insert a new entity into the entity table, identified by EntityID