Entitas-0.32.0
Public Member Functions | Properties | List of all members
Entitas.ReactiveSystem Class Reference
Inheritance diagram for Entitas.ReactiveSystem:

Public Member Functions

 ReactiveSystem (Pool pool, IReactiveSystem subSystem)
 Recommended way to create systems in general: pool.CreateSystem(new MySystem());.
 
 ReactiveSystem (Pool pool, IMultiReactiveSystem subSystem)
 Recommended way to create systems in general: pool.CreateSystem(new MySystem());.
 
 ReactiveSystem (IGroupObserverSystem subSystem)
 Recommended way to create systems in general: pool.CreateSystem(new MySystem());.
 
void Activate ()
 
void Deactivate ()
 
void Clear ()
 Clears all accumulated changes.
 
void Execute ()
 Will call subsystem.Execute() with changed entities if there are any. Otherwise it will not call subsystem.Execute().
 
override string ToString ()
 

Properties

IReactiveExecuteSystem subsystem [get]
 Returns the subsystem which will be managed by this instance of ReactiveSystem.
 

Detailed Description

A ReactiveSystem manages your implementation of a IReactiveSystem, IMultiReactiveSystem or IGroupObserverSystem 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 IGroupObserverSystem.

Member Function Documentation

void Entitas.ReactiveSystem.Activate ( )
inline

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

void Entitas.ReactiveSystem.Deactivate ( )
inline

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


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