IndexExtensions.ComponentIndex_TIndexedComponent,TValue_(thisEntityStore).md

December 3, 2024 ยท View on GitHub

Friflo.Engine.ECS

Friflo.Engine.ECS.IndexExtensions

IndexExtensions.ComponentIndex<TIndexedComponent,TValue>(this EntityStore) Method

Returns the index for indexed components to search entities with a specific component value in O(1).
Executes in O(1).

public static Friflo.Engine.ECS.ComponentIndex<TIndexedComponent,TValue> ComponentIndex<TIndexedComponent,TValue>(this Friflo.Engine.ECS.EntityStore store)
    where TIndexedComponent : struct, Friflo.Engine.ECS.IIndexedComponent<TValue>, System.ValueType, System.ValueType;

Type parameters

TIndexedComponent

TValue

Parameters

store EntityStore

Returns

Friflo.Engine.ECS.ComponentIndex<TIndexedComponent,TValue>