示例#1
0
 public void TransitionIn()
 {
     if (m_TransitionIn == ETransitionType.Fade || m_TransitionOut == ETransitionType.Fade)
     {
         CDUIPanelFader pf = gameObject.GetComponent <CDUIPanelFader>();
         pf.FadeIn(m_TransitionInTime);
     }
 }
示例#2
0
    public void Awake()
    {
        if (m_TransitionIn == ETransitionType.Fade || m_TransitionOut == ETransitionType.Fade)
        {
            CDUIPanelFader pf = gameObject.AddComponent <CDUIPanelFader>();
            pf.EventFadeInFinished  += OnTransitionInFinish;
            pf.EventFadeOutFinished += OnTransitionOutFinish;
        }

        // Disable self, Root2D will handle us
        gameObject.SetActive(false);
    }