ArchetypeQuery_T1,T2,T3,T4_.md

November 22, 2024 ยท View on GitHub

Friflo.Engine.ECS

Friflo.Engine.ECS

ArchetypeQuery<T1,T2,T3,T4> Class

A query instance use to retrieve the given component types. See Example.

public sealed class ArchetypeQuery<T1,T2,T3,T4> : Friflo.Engine.ECS.ArchetypeQuery
    where T1 : struct, System.ValueType, System.ValueType
    where T2 : struct, System.ValueType, System.ValueType
    where T3 : struct, System.ValueType, System.ValueType
    where T4 : struct, System.ValueType, System.ValueType

Type parameters

T1

T2

T3

T4

Inheritance System.Object ๐Ÿก’ ArchetypeQuery ๐Ÿก’ ArchetypeQuery<T1,T2,T3,T4>

Properties
ChunksReturn the Chunk<T>'s storing the components and entities of an ArchetypeQuery<T1,T2,T3,T4>.
See Example.
Methods
AllComponents(ComponentTypes)A query result will contain only entities having all passed componentTypes.
AllTags(Tags)A query result will contain only entities having all passed tags.
AnyComponents(ComponentTypes)A query result will contain only entities having any of the the passed componentTypes.
AnyTags(Tags)A query result will contain only entities having any of the the passed tags.
ForEach(Action<Chunk<T1>,Chunk<T2>,Chunk<T3>,Chunk<T4>,ChunkEntities>)Returns a QueryJob that enables Parallel query execution.
ForEachEntity(ForEachEntity<T1,T2,T3,T4>)Executes the given lambda for each entity in the query result.
FreezeFilter()The query Filter cannot be changed anymore.
HasValue<TComponent,TValue>(TValue)Include entities having a component with the specified value.
Executes in O(1).
ValueInRange<TComponent,TValue>(TValue, TValue)Include entities having a component value in the specified range.
Executes O(N โ‹… log N) N: all unique values.
WithDisabled()A query result will contain Disabled entities.
WithoutAllComponents(ComponentTypes)Entities having all passed componentTypes are excluded from query result.
WithoutAllTags(Tags)Entities having all passed tags are excluded from query result.
WithoutAnyComponents(ComponentTypes)Entities having any of the passed componentTypes are excluded from query result.
WithoutAnyTags(Tags)Entities having any of the passed tags are excluded from query result.