ReactiveSystem(Pool pool, IReactiveExecuteSystem subSystem, TriggerOnEvent[] triggers) { _subsystem = subSystem; var ensureComponents = subSystem as IEnsureComponents; if (ensureComponents != null) { _ensureComponents = ensureComponents.ensureComponents; } var excludeComponents = subSystem as IExcludeComponents; if (excludeComponents != null) { _excludeComponents = excludeComponents.excludeComponents; } _clearAfterExecute = (subSystem as IClearReactiveSystem) != null; var triggersLength = triggers.Length; var groups = new Group[triggersLength]; var eventTypes = new GroupEventType[triggersLength]; for (int i = 0; i < triggersLength; i++) { var trigger = triggers[i]; groups[i] = pool.GetGroup(trigger.trigger); eventTypes[i] = trigger.eventType; } _observer = new GroupObserver(groups, eventTypes); _buffer = new List<Entity>(); }
public MultiReactiveExcludeSubSystemSpy(TriggerOnEvent[] triggers, IMatcher excludeComponents) : base(triggers) { _excludeComponents = excludeComponents; }
static GroupObserver createGroupObserver(Pool pool, TriggerOnEvent[] triggers) { var triggersLength = triggers.Length; var groups = new Group[triggersLength]; var eventTypes = new GroupEventType[triggersLength]; for (int i = 0; i < triggersLength; i++) { var trigger = triggers[i]; groups[i] = pool.GetGroup(trigger.trigger); eventTypes[i] = trigger.eventType; } return new GroupObserver(groups, eventTypes); }
public MultiReactiveSubSystemSpy(TriggerOnEvent[] triggers) { _triggers = triggers; }