![]() |
Entitas
0.40.0
Entitas is a super fast Entity Component System (ECS) Framework specifically made for C# and Unity
|
Public Member Functions | |
void | Activate () |
void | Deactivate () |
void | Clear () |
Clears all accumulated changes. | |
void | Execute () |
override string | ToString () |
Protected Member Functions | |
ReactiveSystem (IContext< TEntity > context) | |
ReactiveSystem (Collector< TEntity > collector) | |
abstract Collector< TEntity > | GetTrigger (IContext< TEntity > context) |
Specify the collector that will trigger the ReactiveSystem. | |
abstract bool | Filter (TEntity entity) |
This will exclude all entities which don't pass the filter. | |
abstract void | Execute (List< TEntity > entities) |
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.
TEntity | : | class | |
TEntity | : | IEntity | |
TEntity | : | new() |
Definition at line 10 of file ReactiveSystem.cs.
|
inline |
Activates the ReactiveSystem and starts observing changes based on the specified Collector. ReactiveSystem are activated by default.
Implements Entitas.IReactiveSystem.
Definition at line 37 of file ReactiveSystem.cs.
|
inline |
Deactivates the ReactiveSystem. No changes will be tracked while deactivated. This will also clear the ReactiveSystem. ReactiveSystem are activated by default.
Implements Entitas.IReactiveSystem.
Definition at line 45 of file ReactiveSystem.cs.
|
inline |
Will call Execute(entities) with changed entities if there are any. Otherwise it will not call Execute(entities).
Implements Entitas.IExecuteSystem.
Definition at line 56 of file ReactiveSystem.cs.