Skip to content

Entity.HasBehavior Method

Definition

Namespace: Brine2D.ECS

Overloads
HasBehavior(Type) Checks if this entity has a behavior of the specified type (non-generic version). Used internally by query infrastructure for dynamic type checking.
HasBehavior<T>() Checks if this entity has a behavior of the specified type.

Entity.HasBehavior(Type) Method

Checks if this entity has a behavior of the specified type (non-generic version). Used internally by query infrastructure for dynamic type checking.

internal bool HasBehavior(System.Type behaviorType);

Parameters

behaviorType System.Type

Returns

System.Boolean

Entity.HasBehavior\<T>() Method

Checks if this entity has a behavior of the specified type.

public bool HasBehavior<T>()
    where T : Brine2D.ECS.Behavior;

Type parameters

T

Returns

System.Boolean