Skip to content

IEntityWorld.FindEntity Method

Definition

Namespace: Brine2D.ECS

Overloads
FindEntity\(Func<Entity,bool>\) Finds the first entity that matches the specified predicate. Only searches active entities.
FindEntity\(Func<Entity,bool>, bool\) Finds the first entity that matches the specified predicate, optionally including inactive entities.

IEntityWorld.FindEntity\(Func\<Entity,bool\>\) Method

Finds the first entity that matches the specified predicate. Only searches active entities.

C#
Brine2D.ECS.Entity? FindEntity(System.Func<Brine2D.ECS.Entity,bool> predicate);

Parameters

predicate System.Func<Entity,System.Boolean>

Returns

Entity

IEntityWorld.FindEntity\(Func\<Entity,bool\>, bool\) Method

Finds the first entity that matches the specified predicate, optionally including inactive entities.

C#
Brine2D.ECS.Entity? FindEntity(System.Func<Brine2D.ECS.Entity,bool> predicate, bool includeInactive);

Parameters

predicate System.Func<Entity,System.Boolean>

The filter to apply to each entity.

includeInactive System.Boolean

When true, inactive entities are also searched. Defaults to false to match the no-arg overload.

Returns

Entity