module

Entitas::IContext

Constants

Log = ::Log.for(self)

Instance methods

add_entity_index(entity_index : Entitas::IEntityIndex)
Source
clear_component_pool(index : Int32)
Source
clear_component_pools
Source
component_index(index) : Entitas::Component::Index
Source
component_index_class(index) : Entitas::Component::ComponentTypes
Source
component_index_value(index) : Int32
Source
component_pools
Source
create_entity
Source
destroy_all_entities
Source
each
Source
entity_factory
Source
get_entities
Source
get_entity_index(name : String) : Entitas::IEntityIndex
Source
get_entity_index?(name : String) : Entitas::IEntityIndex | Nil
Source
get_group(matcher : Entitas::Matcher) : Entitas::Group
Source
has_entity?(entity : TEntity) : Bool
Source
on_entity_created

Will append the &block to the #on_entity_created_event_hooks array

on_entity_created do |event|
  # do something with event
end
on_entity_created_event_hooks

Array of event hooks to trigger when an Entitas::Events::OnEntityCreated is emitted

on_entity_destroyed

Will append the &block to the #on_entity_destroyed_event_hooks array

on_entity_destroyed do |event|
  # do something with event
end
on_entity_destroyed_event_hooks

Array of event hooks to trigger when an Entitas::Events::OnEntityDestroyed is emitted

on_entity_will_be_destroyed

Will append the &block to the #on_entity_will_be_destroyed_event_hooks array

on_entity_will_be_destroyed do |event|
  # do something with event
end
on_entity_will_be_destroyed_event_hooks

Array of event hooks to trigger when an Entitas::Events::OnEntityWillBeDestroyed is emitted

on_group_created

Will append the &block to the #on_group_created_event_hooks array

on_group_created do |event|
  # do something with event
end
on_group_created_event_hooks

Array of event hooks to trigger when an Entitas::Events::OnGroupCreated is emitted

receive_on_entity_created_event(event : Entitas::Events::OnEntityCreated)
receive_on_entity_destroyed_event(event : Entitas::Events::OnEntityDestroyed)
receive_on_entity_will_be_destroyed_event(event : Entitas::Events::OnEntityWillBeDestroyed)
receive_on_group_created_event(event : Entitas::Events::OnGroupCreated)
remove_all_event_handlers
Source
remove_on_entity_created_hook(hook : Proc(Entitas::Events::OnEntityCreated, Nil))
remove_on_entity_destroyed_hook(hook : Proc(Entitas::Events::OnEntityDestroyed, Nil))
remove_on_entity_will_be_destroyed_hook(hook : Proc(Entitas::Events::OnEntityWillBeDestroyed, Nil))
remove_on_group_created_hook(hook : Proc(Entitas::Events::OnGroupCreated, Nil))
reset
Source
reset_creation_index
Source
size
Source
to_json(json : JSON::Builder)
Source
total_components
Source