module Entitas::IGroup
Included Modules
Direct including types
Defined in:
entitas/interfaces/i_group.crConstant Summary
-
Log =
::Log.for(self)
Instance Method Summary
- #get_entities(buff : Enumerable(IEntity))
- #get_single_entity : IEntity | Nil
- #handle_entity(entity : IEntity, index : Int32, component : Entitas::IComponent)
- #handle_entity(entity : IEntity) : Entitas::Events::GroupChanged
- #handle_entity_silently(entity : IEntity)
-
#on_entity_added(&block : Entitas::Events::OnEntityAdded -> Nil)
Will append the
&block
to the#on_entity_added_event_hooks
array -
#on_entity_added_event_hooks : Array(Proc(Entitas::Events::OnEntityAdded, Nil))
Array of event hooks to trigger when an
Entitas::Events::OnEntityAdded
is emitted -
#on_entity_removed(&block : Entitas::Events::OnEntityRemoved -> Nil)
Will append the
&block
to the#on_entity_removed_event_hooks
array -
#on_entity_removed_event_hooks : Array(Proc(Entitas::Events::OnEntityRemoved, Nil))
Array of event hooks to trigger when an
Entitas::Events::OnEntityRemoved
is emitted -
#on_entity_updated(&block : Entitas::Events::OnEntityUpdated -> Nil)
Will append the
&block
to the#on_entity_updated_event_hooks
array -
#on_entity_updated_event_hooks : Array(Proc(Entitas::Events::OnEntityUpdated, Nil))
Array of event hooks to trigger when an
Entitas::Events::OnEntityUpdated
is emitted - #receive_on_entity_added_event(event : Entitas::Events::OnEntityAdded)
- #receive_on_entity_removed_event(event : Entitas::Events::OnEntityRemoved)
- #receive_on_entity_updated_event(event : Entitas::Events::OnEntityUpdated)
- #remove_all_event_handlers
- #remove_on_entity_added_hook(hook : Proc(Entitas::Events::OnEntityAdded, Nil))
- #remove_on_entity_removed_hook(hook : Proc(Entitas::Events::OnEntityRemoved, Nil))
- #remove_on_entity_updated_hook(hook : Proc(Entitas::Events::OnEntityUpdated, Nil))
- #update_entity(entity : IEntity, index : Int32, prev_component : Entitas::IComponent | Nil, new_component : Entitas::IComponent | Nil)
Instance methods inherited from module Entitas::Helper::Entities(Entitas::IEntity)
count : Int32
count,
each(&block : TEntity -> Nil)
each,
get_entities
get_entities,
has_entity?(entity : TEntity) : Bool
has_entity?,
size
size,
sort(&block : TEntity, TEntity -> U) : Array(TEntity) forall U
sort
Instance Method Detail
Will append the &block
to the #on_entity_added_event_hooks
array
on_entity_added do |event|
# do something with event
end
Array of event hooks to trigger when an Entitas::Events::OnEntityAdded
is emitted
Will append the &block
to the #on_entity_removed_event_hooks
array
on_entity_removed do |event|
# do something with event
end
Array of event hooks to trigger when an Entitas::Events::OnEntityRemoved
is emitted
Will append the &block
to the #on_entity_updated_event_hooks
array
on_entity_updated do |event|
# do something with event
end
Array of event hooks to trigger when an Entitas::Events::OnEntityUpdated
is emitted