Entitas Redux
JCMG.EntitasRedux.ReactiveSystem< TEntity > Class Template Referenceabstract

A ReactiveSystem calls Execute(entities) if there were changes based on the specified Collector and will only pass in changed entities. A common use-case is to react to changes, e.g. a change of the position of an entity to update the gameObject.transform.position of the related gameObject. More...

Inheritance diagram for JCMG.EntitasRedux.ReactiveSystem< TEntity >:
JCMG.EntitasRedux.IReactiveSystem JCMG.EntitasRedux.ISystem

Public Member Functions

override string ToString ()
 
void Activate ()
 Activates the ReactiveSystem and starts observing changes based on the specified Collector. ReactiveSystem are activated by default. More...
 
void Deactivate ()
 Deactivates the ReactiveSystem. No changes will be tracked while deactivated. This will also clear the ReactiveSystem. ReactiveSystem are activated by default. More...
 
void Clear ()
 Clears all accumulated changes. More...
 
void Execute ()
 Will call Execute(entities) with changed entities if there are any. Otherwise it will not call Execute(entities). More...
 

Detailed Description

A ReactiveSystem calls Execute(entities) if there were changes based on the specified Collector and will only pass in changed entities. A common use-case is to react to changes, e.g. a change of the position of an entity to update the gameObject.transform.position of the related gameObject.

Template Parameters
TEntity
Type Constraints
TEntity :class 
TEntity :IEntity 

Definition at line 38 of file ReactiveSystem.cs.

Member Function Documentation

◆ Activate()

void JCMG.EntitasRedux.ReactiveSystem< TEntity >.Activate ( )

Activates the ReactiveSystem and starts observing changes based on the specified Collector. ReactiveSystem are activated by default.

Implements JCMG.EntitasRedux.IReactiveSystem.

Definition at line 94 of file ReactiveSystem.cs.

◆ Clear()

void JCMG.EntitasRedux.ReactiveSystem< TEntity >.Clear ( )

Clears all accumulated changes.

Implements JCMG.EntitasRedux.IReactiveSystem.

Definition at line 113 of file ReactiveSystem.cs.

◆ Deactivate()

void JCMG.EntitasRedux.ReactiveSystem< TEntity >.Deactivate ( )

Deactivates the ReactiveSystem. No changes will be tracked while deactivated. This will also clear the ReactiveSystem. ReactiveSystem are activated by default.

Implements JCMG.EntitasRedux.IReactiveSystem.

Definition at line 105 of file ReactiveSystem.cs.

◆ Execute()

void JCMG.EntitasRedux.ReactiveSystem< TEntity >.Execute ( )

Will call Execute(entities) with changed entities if there are any. Otherwise it will not call Execute(entities).

Implements JCMG.EntitasRedux.IReactiveSystem.

Definition at line 122 of file ReactiveSystem.cs.

◆ ToString()

override string JCMG.EntitasRedux.ReactiveSystem< TEntity >.ToString ( )

Definition at line 74 of file ReactiveSystem.cs.


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