Ejemplo n.º 1
0
        //implement IViewMgr
        public bool DestoryView(CnPanelObj view)
        {
            bool isTop = this.IsTop(view);

            this._viewStack.Remove(view);

            if (isTop)
            {
                CnPanelObj next = this.GetTopView();
                if (next != null)
                {
                    next.DoBring2Top(view);
                }
            }
            GameObject.Destroy(view.UIObj);
            return(true);
        }
Ejemplo n.º 2
0
        public bool DoHide(CnPanelObj view)
        {
            bool ret = false;

            if (this._viewStack.Contains(view))
            {
                bool isTop = this.IsTop(view);
                this._viewStack.Remove(view);
                if (isTop)
                {
                    CnPanelObj next = this.GetTopView();
                    if (next != null)
                    {
                        next.DoBring2Top(view);
                    }
                }
            }
            this._initViewSet.Add(view);
            view.UIObj.SetActive(false);
            ret = true;
            return(ret);
        }