Exemple #1
0
 protected virtual void Awake()
 {
     //Actived = false;
     MainObject       = gameObject;
     CatchedTransform = transform;
     m_canvas         = GetComponent <Canvas>();
     m_rectTrans      = GetComponent <RectTransform>();
     //m_rectTrans.anc
     //m_canvas.IsInherited = true;
     CatchedPriority = Priority;
     CatchedSortType = SortType;
 }
Exemple #2
0
    public void PostClose()
    {
        m_isClosing = true;
        if (ParentWindow != null && !ParentWindow.m_isClosing)
        {
            ParentWindow.RemoveSubWindow(this);
        }
        m_parentWindow = null;

        for (int i = 0, max = m_subWindows.Count; i < max; ++i)
        {
            if (m_subWindows[i] != null)
            {
                m_subWindows[i].Close();
            }
        }

        m_subWindows.Clear();

        if (MainObject != null)
        {
            if (IsDestroyWhenClose)
            {
                Destroy(MainObject);
                if (IsUnloadResource)
                {
                }
            }
            else
            {
                MainObject.SetActive(false);
            }
        }

        Priority = CatchedPriority;
        SortType = CatchedSortType;


        m_isClosing = false;
    }