View Source ECSx.Tag behaviour (ECSx v0.5.1)
A component type which does not require a value. This is useful when the mere presence or absence of a component is all the information we need.
For example, if we want a component type to model a boolean attribute, such as whether or not players may target a particular entity, we'll use a Tag:
defmodule MyApp.Components.Targetable do
use ECSx.Tag
end
Then we can check for targetability with ...Targetable.exists?(entity)
or get a list of all targetable entities with ...Targetable.get_all()
.
options
Options
:read_concurrency
- whentrue
, enables read concurrency for this component table. Only set this if you know what you're doing. Defaults tofalse
Link to this section Summary
Callbacks
Creates a new tag for a given entity.
Checks if an entity has this tag.
Gets a list of all entities with this tag.
Removes this component from an entity.
Link to this section Types
@type id() :: any()