コード例 #1
0
    /// <summary>
    /// UI入栈操作,显示第一个面板
    /// </summary>
    /// <param name="nextPanel">要显示的面板</param>
    public void Push(BasePanel nextPanel)
    {
        if (stackPanel.Count > 0)
        {
            panel = stackPanel.Peek();
            panel.OnPause();
        }
        stackPanel.Push(nextPanel);
        GameObject panelGo = uiManager.GetSingleUI(nextPanel.UIType);

        nextPanel.Initalize(new UITool(panelGo));
        nextPanel.Initalize(this);
        nextPanel.Initalize(uiManager);
        nextPanel.OnEnter();
    }