using System; using EcsRx.Entities; using EcsRx.Systems; namespace EcsRx.Plugins.ReactiveSystems.Systems { /// /// React To Entity systems react as and when the entity needs to be processed, /// this means rather than batching all updates at once, it instead allows you /// to react on each entity individually, i.e when the entity has less than 50% /// hp. /// /// /// If you do not need to react to each entity individually it is recommended you /// use a React To LookupGroup system as they have less overhead as there is only one /// subscription required rather than 1 per entity. /// public interface IReactToEntitySystem : ISystem { /// /// Returns and observable indicating when the system should execute for a given entity /// /// The entity to react to /// Observable indicating when the system should execute IObservable ReactToEntity(IEntity entity); /// /// The processor to handle the entity reaction /// /// The entity to use void Process(IEntity entity); } }