![]() |
Entitas
0.40.0
Entitas is a super fast Entity Component System (ECS) Framework specifically made for C# and Unity
|
Public Member Functions | |
Group (IMatcher< TEntity > matcher) | |
void | HandleEntitySilently (TEntity entity) |
This is used by the context to manage the group. | |
void | HandleEntity (TEntity entity, int index, IComponent component) |
This is used by the context to manage the group. | |
void | UpdateEntity (TEntity entity, int index, IComponent previousComponent, IComponent newComponent) |
This is used by the context to manage the group. | |
void | RemoveAllEventHandlers () |
GroupChanged< TEntity > | HandleEntity (TEntity entity) |
bool | ContainsEntity (TEntity entity) |
Determines whether this group has the specified entity. | |
TEntity [] | GetEntities () |
Returns all entities which are currently in this group. | |
TEntity | GetSingleEntity () |
override string | ToString () |
Properties | |
int | count [get] |
Returns the number of entities in the group. | |
IMatcher< TEntity > | matcher [get] |
Returns the matcher which was used to create this group. | |
Events | |
GroupChanged< TEntity > | OnEntityAdded |
Occurs when an entity gets added. | |
GroupChanged< TEntity > | OnEntityRemoved |
Occurs when an entity gets removed. | |
GroupUpdated< TEntity > | OnEntityUpdated |
Occurs when a component of an entity in the group gets replaced. | |
Use context.GetGroup(matcher) to get a group of entities which match the specified matcher. Calling context.GetGroup(matcher) with the same matcher will always return the same instance of the group. The created group is managed by the context and will always be up to date. It will automatically add entities that match the matcher or remove entities as soon as they don't match the matcher anymore.
TEntity | : | class | |
TEntity | : | IEntity | |
TEntity | : | new() |
|
inline |
|
inline |
|
inline |