Esempio n. 1
0
 /// <summary>
 /// 返回上一面板
 /// </summary>
 public void GoBack()
 {
     //关闭最顶层面板
     if (uiStack.Count > 1)
     {
         UIPanelBase uIPanelBase = uiStack.Pop();
         //林奕州2020/3/3修改:限制返回到起始页
         if (uiStack.Peek().gameObject.name == firstPanel.name + "(Clone)")
         {
             uiStack.Push(uIPanelBase);
             Debug.Log("已经返回到底部");
             return;
         }
         uIPanelBase.OnExit();
         CloseByEffect(uIPanelBase);
         //恢复显示下一层面板
         if (uiStack.Count > 0)
         {
             UIPanelBase uIPanelBase1 = uiStack.Peek();
             uIPanelBase1.OnResume();
             uIPanelBase1.transform.SetAsLastSibling();
             OpenByEffect(uIPanelBase1);
             //var cg = GetCanvasGroup(uIPanelBase1);
             //cg.interactable = true;
         }
     }
 }