class

Entitas::Group(TEntity)

Inherits Enumerable / Entitas::Helper::Entities / Entitas::IGroup / Entitas::Helper::Entities / Reference / Object

Constructors

new(matcher : Entitas::Matcher)
Source

Instance methods

add_entity(entity : Entity, index : Int32, component : Component)
Source
add_entity_silently(entity : TEntity) : TEntity | Bool
Source
get_entities(buff : Enumerable(IEntity))
Source
get_single_entity

Returns the only entity in this group. It will return null if the group is empty. It will throw an exception if the group has more than one entity.

Source
handle_entity(entity : IEntity, index : Int32, component : Entitas::IComponent)

This is used by the context to manage the group.

Source
handle_entity(entity : IEntity) : Entitas::Events::GroupChanged
Source
handle_entity_silently(entity : IEntity)

This is used by the context to manage the group.

Source
remove_all_event_handlers

Removes all event handlers from this group. Keep in mind that this will break reactive systems and entity indices which rely on this group.

Removes: OnEntityRemoved, OnEntityAdded, and OnEntityUpdated

Source
remove_entity(entity : Entity, index : Int32, component : Component) : Entity | Nil
Source
remove_entity_silently(entity : Entity) : Entity | Nil
Source
to_json(json)
Source
to_s(io)
Source
update_entity(entity : IEntity, index : Int32, prev_component : Entitas::IComponent | Nil, new_component : Entitas::IComponent | Nil)

This is used by the context to manage the group.

Source

Nested types