protected virtual void Update()
        {
            if (WaitForOtherAnimations && m_CurrentTransitionArgs != null && m_CurrentTransitionArgs.HasTransitions(this, WaitForTransitionTypes))
            {
                m_StartTime = Now;
                return;
            }

            float progress = (Now - m_StartTime) / Duration;

            progress = Mathf.Clamp01(progress);

            TargetCanvas.alpha = Mathf.Lerp(m_StartAlpha, m_EndAlpha, progress);

            if (progress >= 1.0f)
            {
                if (m_EndAlpha == 0.0f)
                {
                    TargetCanvas.gameObject.SetActive(false);
                }
                enabled = false;

                if (m_CurrentTransitionArgs != null)
                {
                    m_CurrentTransitionArgs.RemoveTransition(this);
                    m_CurrentTransitionArgs = null;
                }
            }
        }
Exemple #2
0
 public void Dispose()
 {
     m_TransitionArgs.RemoveTransition(m_Source);
 }