Entitas  0.40.0
Entitas is a super fast Entity Component System (ECS) Framework specifically made for C# and Unity
IGroup.cs
1 namespace Entitas {
2 
3  public delegate void GroupChanged<TEntity>(
4  IGroup<TEntity> group, TEntity entity, int index, IComponent component
5  ) where TEntity : class, IEntity, new();
6 
7  public delegate void GroupUpdated<TEntity>(
8  IGroup<TEntity> group, TEntity entity, int index,
9  IComponent previousComponent, IComponent newComponent
10  ) where TEntity : class, IEntity, new();
11 
12  public interface IGroup {
13 
14  int count { get; }
15 
16  void RemoveAllEventHandlers();
17  }
18 
19  public interface IGroup<TEntity> : IGroup where TEntity : class, IEntity, new() {
20 
21  event GroupChanged<TEntity> OnEntityAdded;
22  event GroupChanged<TEntity> OnEntityRemoved;
23  event GroupUpdated<TEntity> OnEntityUpdated;
24 
25  IMatcher<TEntity> matcher { get; }
26 
27  void HandleEntitySilently(TEntity entity);
28  void HandleEntity(TEntity entity, int index, IComponent component);
29 
30  GroupChanged<TEntity> HandleEntity(TEntity entity);
31 
32  void UpdateEntity(TEntity entity, int index, IComponent previousComponent, IComponent newComponent);
33 
34  bool ContainsEntity(TEntity entity);
35 
36  TEntity[] GetEntities();
37  TEntity GetSingleEntity();
38  }
39 }