namespace Zinnia.Process.Moment { using UnityEngine; using Zinnia.Process.Moment.Collection; /// /// Processes a list of as if it's a single process. /// public class CompositeProcess : MonoBehaviour, IProcessable { [Tooltip("A collection of MomentProcess to process.")] [SerializeField] private MomentProcessObservableList processes; /// /// A collection of to process. /// public MomentProcessObservableList Processes { get { return processes; } set { processes = value; } } /// /// Iterates through and calls on each one. /// public void Process() { if (Processes == null) { return; } foreach (MomentProcess currentProcess in Processes.NonSubscribableElements) { currentProcess.Process(); } } } }