Entitas  0.35.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.ReactiveSystem Class Reference
Inheritance diagram for Entitas.ReactiveSystem:
Entitas.IExecuteSystem Entitas.ISystem

Public Member Functions

 ReactiveSystem (Pool pool, IReactiveSystem subSystem)
 
 ReactiveSystem (Pool pool, IMultiReactiveSystem subSystem)
 
 ReactiveSystem (IEntityCollectorSystem subSystem)
 
void Activate ()
 
void Deactivate ()
 
void Clear ()
 Clears all accumulated changes.
 
void Execute ()
 
override string ToString ()
 

Properties

IReactiveExecuteSystem subsystem [get]
 

Detailed Description

A ReactiveSystem manages your implementation of a IReactiveSystem, IMultiReactiveSystem or IEntityCollectorSystem subsystem. It will only call subsystem.Execute() if there were changes based on the triggers and eventTypes specified by your subsystem 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. Recommended way to create systems in general: pool.CreateSystem(new MySystem()); This will automatically wrap MySystem in a ReactiveSystem if it implements IReactiveSystem, IMultiReactiveSystem or IEntityCollectorSystem.

Definition at line 16 of file ReactiveSystem.cs.

Constructor & Destructor Documentation

§ ReactiveSystem() [1/3]

Entitas.ReactiveSystem.ReactiveSystem ( Pool  pool,
IReactiveSystem  subSystem 
)
inline

Recommended way to create systems in general: pool.CreateSystem(new MySystem());

Definition at line 32 of file ReactiveSystem.cs.

§ ReactiveSystem() [2/3]

Entitas.ReactiveSystem.ReactiveSystem ( Pool  pool,
IMultiReactiveSystem  subSystem 
)
inline

Recommended way to create systems in general: pool.CreateSystem(new MySystem());

Definition at line 39 of file ReactiveSystem.cs.

§ ReactiveSystem() [3/3]

Entitas.ReactiveSystem.ReactiveSystem ( IEntityCollectorSystem  subSystem)
inline

Recommended way to create systems in general: pool.CreateSystem(new MySystem());

Definition at line 45 of file ReactiveSystem.cs.

Member Function Documentation

§ Activate()

void Entitas.ReactiveSystem.Activate ( )
inline

Activates the ReactiveSystem and starts observing changes based on the triggers and eventTypes specified by the subsystem. ReactiveSystem are activated by default.

Definition at line 84 of file ReactiveSystem.cs.

§ Deactivate()

void Entitas.ReactiveSystem.Deactivate ( )
inline

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

Definition at line 92 of file ReactiveSystem.cs.

§ Execute()

void Entitas.ReactiveSystem.Execute ( )
inline

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

Implements Entitas.IExecuteSystem.

Definition at line 103 of file ReactiveSystem.cs.

Property Documentation

§ subsystem

IReactiveExecuteSystem Entitas.ReactiveSystem.subsystem
get

Returns the subsystem which will be managed by this instance of ReactiveSystem.

Definition at line 20 of file ReactiveSystem.cs.


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