//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); }
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); }