using System; using EcsRx.Entities; using EcsRx.Systems; namespace EcsRx.Plugins.ReactiveSystems.Systems { /// /// React to data systems are a more advanced version of React To Entity systems, /// they allow you to not only react to entity changes but also pass back custom /// payloads to the executor, use this if you need to react with custom data /// /// The type of payload to react with public interface IReactToDataSystem : ISystem { /// /// Returns and observable indicating both when the system should execute for a given entity /// as well as what the data should be to be passed to the executor /// /// The entity to react to /// Observable containing data IObservable ReactToData(IEntity entity); /// /// The executor which is passed both the entity and the data from the reaction /// /// The entity to use /// The data from the reaction void Process(IEntity entity, T reactionData); } }