IndexExtensions.md

December 3, 2024 · View on GitHub

Friflo.Engine.ECS

Friflo.Engine.ECS

IndexExtensions Class

Provide extension methods to query all or specific component values.
Enables to query all or specific entity links (relationships).

public static class IndexExtensions

Inheritance System.Object 🡒 IndexExtensions

Methods
ComponentIndex<TIndexedComponent,TValue>(this EntityStore)Returns the index for indexed components to search entities with a specific component value in O(1).
Executes in O(1).
GetAllIndexedComponentValues<TComponent,TValue>(this EntityStore)Obsolete: Use Values
Returns all indexed component values of the passed TComponent type.
Executes in O(1). Each value in the returned list is unique. See remarks for additional infos.
GetAllLinkedEntities<TComponent>(this EntityStore)Obsolete: Use Values
Returns all entities linked by the specified ILinkComponent type.
Executes in O(1). Each entity in the returned list is unique. See remarks for additional infos.
GetEntitiesWithComponentValue<TComponent,TValue>(this EntityStore, TValue)Obsolete: Use this[TValue]
Return the entities with the passed component value.
Executes in O(1) with default index.
GetIncomingLinks<TComponent>(this Entity)Return the entities with a link component referencing the target entity of the passed ILinkComponent type.
Executes in O(1).
LinkComponentIndex<TLinkComponent>(this EntityStore)Returns the index for link components to search entities with a specific entity in O(1).
Executes in O(1).