DistributedEcs v0.1.4 DistributedEcs.Entity View Source

Link to this section Summary

Functions

Add an initialized component to an entity

Check if an entity has an instance of a given component

Checks if an entity matches an aspect

Creates a new entity

Link to this section Types

Link to this type t() View Source
t() :: %DistributedEcs.Entity{components: components(), id: String.t()}
Link to this type uninitialized_component() View Source
uninitialized_component() :: atom()

Link to this section Functions

Add an initialized component to an entity

Link to this function apply_changes(entity, changes) View Source
apply_changes(t(), DistributedEcs.Changes.t()) :: t()
Link to this function find_component(entity, component) View Source
find_component(t(), uninitialized_component()) ::
  DistributedEcs.Component.t() | nil
Link to this function has_component?(entity, component) View Source
has_component?(t(), uninitialized_component()) :: boolean()

Check if an entity has an instance of a given component

Link to this function match_aspect?(entity, aspect) View Source
match_aspect?(t(), DistributedEcs.Aspect.t()) :: boolean()

Checks if an entity matches an aspect

Creates a new entity