FilterAttribute

Namespace: Bang.Systems
Assembly: Bang.dll

public class FilterAttribute : Attribute

Indicates characteristics of a system that was implemented on our ECS system. This must be implemented by all the systems that inherits from ISystem.

Implements: Attribute

⭐ Constructors

public FilterAttribute(ContextAccessorFilter filter, ContextAccessorKind kind, Type[] types)

Creates a system filter with custom accessors.

Parameters
filter ContextAccessorFilter
kind ContextAccessorKind
types Type[]

public FilterAttribute(ContextAccessorFilter filter, Type[] types)

Create a system filter with default accessor of [FilterAttribute.Kind" /> for for <paramref name="types).

Parameters
filter ContextAccessorFilter
types Type[]

public FilterAttribute(ContextAccessorKind kind, Type[] types)

Create a system filter with default accessor of [FilterAttribute.Filter" /> for for <paramref name="types).

Parameters
kind ContextAccessorKind
types Type[]

public FilterAttribute(Type[] types)

Create a system filter with default accessors for .

Parameters
types Type[]

⭐ Properties

Filter

public ContextAccessorFilter Filter { get; public set; }

This is how the system will filter the entities. See ContextAccessorFilter.

Returns
ContextAccessorFilter

Kind

public ContextAccessorKind Kind { get; public set; }

This is the kind of accessor that will be made on this component. This can be leveraged once we parallelize update frames (which we don't yet), so don't bother with this just yet.

Returns
ContextAccessorKind

TypeId

public virtual Object TypeId { get; }

Returns
Object

Types

public Type[] Types { get; public set; }

System will target all the entities that has all this set of components.

Returns
Type[]