using System; public class FaderEventDriven : BaseFader { protected override void ApplyFadeValue(float value) { if (this.onApplyFadeValue != null) { this.onApplyFadeValue(value); } } protected override float GetFadeValue() { return (this.onGetFadeValue == null) ? 0f : this.onGetFadeValue(); } protected override bool CheckSkipState() { return this.onCheckSkipState != null && this.onCheckSkipState(); } protected override void OnBeforeFadeIn() { if (this.onBeforeFadeIn != null) { this.onBeforeFadeIn(); } } protected override void OnAfterFadeIn() { if (this.onAfterFadeIn != null) { this.onAfterFadeIn(); } } protected override void OnBeforeFadeOut() { if (this.onBeforeFadeOut != null) { this.onBeforeFadeOut(); } } protected override void OnAfterFadeOut() { if (this.onAfterFadeOut != null) { this.onAfterFadeOut(); } } protected override void OnAbortFadeIn() { if (this.onAbortFadeIn != null) { this.onAbortFadeIn(); } } protected override void OnAbortFadeOut() { if (this.onAbortFadeOut != null) { this.onAbortFadeOut(); } } public Action onApplyFadeValue; public Func onGetFadeValue; public Func onCheckSkipState; public Action onBeforeFadeIn; public Action onAfterFadeIn; public Action onBeforeFadeOut; public Action onAfterFadeOut; public Action onAbortFadeIn; public Action onAbortFadeOut; }