Class FilterBuilder
Namespace: KenseiECS
Fluent builder for creating filters.
Usage:
csharp
var filter = world.Filter()
.Inc<Position>()
.Inc<Velocity>()
.Exc<Frozen>()
.Any<Health>().Any<Shield>()
.End();csharp
public class FilterBuilderInheritance
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Methods
Any<T>()
Require at least one of the Any-registered component types.
csharp
public FilterBuilder Any<T>() where T : struct, IComponentReturns
Type Parameters
T
End()
Finalize and register the filter with the World. If a filter with identical constraints already exists, returns the existing one.
csharp
public Filter End()Returns
Exc<T>()
Exclude entities that have component of type T.
csharp
public FilterBuilder Exc<T>() where T : struct, IComponentReturns
Type Parameters
T
Inc<T>()
Require component of type T.
csharp
public FilterBuilder Inc<T>() where T : struct, IComponentReturns
Type Parameters
T
