module Entitas::Helper::ComponentPools

Direct including types

Defined in:

entitas/helpers/component_pools.cr

Instance Method Summary

Instance Method Detail

def clear_component_pool(index : Int32) #

Clears the ComponentPool at the specified index.


[View source]
def clear_component_pool(index : Entitas::Component::ComponentTypes) #

[View source]
def clear_component_pools #

Clears all ComponentPools.


[View source]
abstract def component_index_value(index) : Int32 #

[View source]
def component_pool(index : Int32) : ComponentPool #

Returns the ComponentPool for the specified component index. #component_pools is set by the context which created the entity and is used to reuse removed components. Removed components will be pushed to the componentPool. Use entity.create_component(index, type) to get a new or reusable component from the ComponentPool.


[View source]
def component_pool(index : Entitas::Component::ComponentTypes) : ComponentPool #

[View source]
def component_pool(index : Entitas::Component::Index) : ComponentPool #

[View source]
def component_pools : Array(Entitas::ComponentPool) #

component_pools is set by the context which created the entity and is used to reuse removed components. Removed components will be pushed to the componentPool. Use entity.CreateComponent(index, type) to get a new or reusable component from the componentPool. Use entity.GetComponentPool(index) to get a componentPool for a specific component index.


[View source]