Beispiel #1
0
    /// <summary>
    /// 销毁指定页面
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public void ClosePage <T>() where T : TTUIPage
    {
        Type   t        = typeof(T);
        string pageName = t.ToString();

        if (m_allPages != null && m_allPages.ContainsKey(pageName))
        {
            TTUIPage tempPage = m_allPages[pageName];
            if (m_currentPageNodes.Contains(tempPage))
            {
                m_currentPageNodes.Remove(tempPage);
            }
            m_allPages.Remove(pageName);
            tempPage.Close();
        }
        else
        {
            Debug.Log(pageName + ":havnt show yet!");
        }
    }