Entitas::IEntity
Constants
Instance methods
The context manages the state of an entity. Active entities are enabled, destroyed entities are not.
Will return the Entitas::Component at the provided index.
You can only get a component at an index if it exists.
Determines whether this entity has a component at any of the specified indices.
Determines whether this entity has a component at the specified index.
Determines whether this entity has components at all the specified indices.
Will append the &block to the #on_component_added_event_hooks array
on_component_added do |event|
# do something with event
end
Array of event hooks to trigger when an Entitas::Events::OnComponentAdded is emitted
Will append the &block to the #on_component_removed_event_hooks array
on_component_removed do |event|
# do something with event
end
Array of event hooks to trigger when an Entitas::Events::OnComponentRemoved is emitted
Will append the &block to the #on_component_replaced_event_hooks array
on_component_replaced do |event|
# do something with event
end
Array of event hooks to trigger when an Entitas::Events::OnComponentReplaced is emitted
Will append the &block to the #on_destroy_entity_event_hooks array
on_destroy_entity do |event|
# do something with event
end
Array of event hooks to trigger when an Entitas::Events::OnDestroyEntity is emitted
Will append the &block to the #on_entity_created_event_hooks array
on_entity_created do |event|
# do something with event
end
Array of event hooks to trigger when an Entitas::Events::OnEntityCreated is emitted
Will append the &block to the #on_entity_destroyed_event_hooks array
on_entity_destroyed do |event|
# do something with event
end
Array of event hooks to trigger when an Entitas::Events::OnEntityDestroyed is emitted
Will append the &block to the #on_entity_released_event_hooks array
on_entity_released do |event|
# do something with event
end
Array of event hooks to trigger when an Entitas::Events::OnEntityReleased is emitted
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
Array of event hooks to trigger when an Entitas::Events::OnEntityWillBeDestroyed is emitted
Will append the &block to the #on_group_created_event_hooks array
on_group_created do |event|
# do something with event
end
Array of event hooks to trigger when an Entitas::Events::OnGroupCreated is emitted