Example #1
0
        //フェードアウト処理
        public void FadeOut(float time, Action onComplete)
        {
            if (TargetObject == null)
            {
                if (onComplete != null)
                {
                    onComplete();
                }
                return;
            }

            float begin = this.EffectColor.FadeAlpha;
            float end   = 0;

            FadeTimer.StartTimer(
                time,
                x =>
            {
                this.EffectColor.FadeAlpha = x.GetCurve(begin, end);
            },
                x =>
            {
                if (onComplete != null)
                {
                    onComplete();
                }
            }
                );
        }
Example #2
0
        //フェードイン処理
        public void FadeIn(float fadeTime, Action onComplete)
        {
            float begin = 0;
            float end   = 1;

            FadeTimer.StartTimer(
                fadeTime,
                x =>
            {
                this.EffectColor.FadeAlpha = x.GetCurve(begin, end);
            },
                x =>
            {
                if (onComplete != null)
                {
                    onComplete();
                }
            }
                );
        }