Entitas  0.40.0
Entitas is a super fast Entity Component System (ECS) Framework specifically made for C# and Unity
Public Member Functions | Properties | List of all members
Entitas.Collector< TEntity > Class Template Reference

Public Member Functions

 Collector (IGroup< TEntity > group, GroupEvent groupEvent)
 
 Collector (IGroup< TEntity >[] groups, GroupEvent[] groupEvents)
 
void Activate ()
 
void Deactivate ()
 
void ClearCollectedEntities ()
 Clears all collected entities.
 
override string ToString ()
 

Properties

HashSet< TEntity > collectedEntities [get]
 

Detailed Description

A Collector can observe one or more groups from the same context and collects changed entities based on the specified groupEvent.

Type Constraints
TEntity :class 
TEntity :IEntity 
TEntity :new() 

Definition at line 8 of file Collector.cs.

Constructor & Destructor Documentation

◆ Collector() [1/2]

Entitas.Collector< TEntity >.Collector ( IGroup< TEntity >  group,
GroupEvent  groupEvent 
)
inline

Creates a Collector and will collect changed entities based on the specified groupEvent.

Definition at line 25 of file Collector.cs.

◆ Collector() [2/2]

Entitas.Collector< TEntity >.Collector ( IGroup< TEntity > []  groups,
GroupEvent []  groupEvents 
)
inline

Creates a Collector and will collect changed entities based on the specified groupEvents.

Definition at line 30 of file Collector.cs.

Member Function Documentation

◆ Activate()

void Entitas.Collector< TEntity >.Activate ( )
inline

Activates the Collector and will start collecting changed entities. Collectors are activated by default.

Definition at line 49 of file Collector.cs.

◆ Deactivate()

void Entitas.Collector< TEntity >.Deactivate ( )
inline

Deactivates the Collector. This will also clear all collected entities. Collectors are activated by default.

Definition at line 75 of file Collector.cs.

Property Documentation

◆ collectedEntities

HashSet<TEntity> Entitas.Collector< TEntity >.collectedEntities
get

Returns all collected entities. Call collector.ClearCollectedEntities() once you processed all entities.

Definition at line 13 of file Collector.cs.


The documentation for this class was generated from the following file: