Entitas  0.35.0
Entitas is a super fast Entity Component System (ECS) Framework specifically made for C# and Unity
IReactiveSystem.cs
1 using System.Collections.Generic;
2 
3 namespace Entitas {
4 
5  /// Implement this interface if you want to create a reactive system which
6  /// is triggered by the specified trigger.
8  TriggerOnEvent trigger { get; }
9  }
10 
11  /// Implement this interface if you want to create a reactive system which
12  /// is triggered by any of the specified triggers.
14  TriggerOnEvent[] triggers { get; }
15  }
16 
17  /// Implement this interface if you want to create a reactive system which
18  /// is triggered by an EntityCollector.
19  /// This is useful when you want to react to changes in multiple groups
20  /// from different pools.
22  EntityCollector entityCollector { get; }
23  }
24 
25  /// Not meant to be implemented. Use IReactiveSystem, IMultiReactiveSystem
26  /// or IEntityCollectorSystem.
27  public interface IReactiveExecuteSystem : ISystem {
28  void Execute(List<Entity> entities);
29  }
30 
31  /// Implement this interface in combination with IReactiveSystem,
32  /// IMultiReactiveSystem or IEntityCollectorSystem.
33  /// It will ensure that all entities will match the specified matcher.
34  /// This is useful when a component triggered the reactive system, but once
35  /// the system gets executed the component already has been removed.
36  /// Implementing IEnsureComponents can filter these enities.
37  public interface IEnsureComponents {
38  IMatcher ensureComponents { get; }
39  }
40 
41  /// Implement this interface in combination with IReactiveSystem,
42  /// IMultiReactiveSystem or IEntityCollectorSystem.
43  /// It will exclude all entities which match the specified matcher.
44  /// To exclude multiple components use
45  /// Matcher.AnyOf(ComponentX, ComponentY, ComponentZ).
46  public interface IExcludeComponents {
47  IMatcher excludeComponents { get; }
48  }
49 
50  /// Implement this interface in combination with IReactiveSystem,
51  /// IMultiReactiveSystem or IEntityCollectorSystem.
52  /// If a system changes entities which in turn would trigger itself
53  /// consider implementing IClearReactiveSystem
54  /// which will ignore the changes made by the system.
55  public interface IClearReactiveSystem {
56  }
57 }