QueryFilter.md
July 1, 2024 ยท View on GitHub
Friflo.Engine.ECS
Friflo.Engine.ECS
QueryFilter Class
Contains component and tags filters added to an ArchetypeQuery.
Multiple ArchetypeQuery's can share a single QueryFilter instance.
public class QueryFilter
Inheritance System.Object ๐ก QueryFilter
| Constructors | |
|---|---|
| QueryFilter() | Create a filter returning all Enabled entities. |
| Fields | |
|---|---|
| Condition | Return all filter conditions of QueryFilter. |
| Methods | |
|---|---|
| AllComponents(ComponentTypes) | Include entities containing all specified component types. |
| AllTags(Tags) | Include entities containing all specified tags. |
| AnyComponents(ComponentTypes) | Include entities containing any of the specified component types. |
| AnyTags(Tags) | Include entities containing any of the specified tags. |
| FreezeFilter() | QueryFilter 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 will return Enabled as well as disabled entities. |
| WithoutAllComponents(ComponentTypes) | Exclude entities containing all specified component types. |
| WithoutAllTags(Tags) | Exclude entities containing all specified tags. |
| WithoutAnyComponents(ComponentTypes) | Exclude entities containing any of the specified component types. |
| WithoutAnyTags(Tags) | Exclude entities containing any of the specified tags. |