public void RegisterInterpolator(CameraEffectsInterpolator interpolator) { if (!interpolators.ContainsKey(interpolator.Id)) { interpolators.Add(interpolator.Id, interpolator); } }
public void Start() { dummyEffect = gameObject.GetComponent <CameraEffectsInterpolator> (); if (dummyEffect == null) { dummyEffect = gameObject.AddComponent <CameraEffectsInterpolator> (); dummyEffect.Id = "Dummy. Please ignore"; } foreach (var interpolator in interpolators.Values) { interpolator.Setup(); } }
public void Setup(CameraEffectsInterpolator parent) { this.parent = parent; List <InterpolatorDataWrapper> dataToRemove = new List <InterpolatorDataWrapper>(); foreach (var interpolatorData in Values) { var i = interpolatorData.Get(); if (i != null) { i.UpdateFieldInfo(Postprocess); } else { dataToRemove.Add(interpolatorData); } } foreach (var interpolatorData in dataToRemove) { Values.Remove(interpolatorData); } }