Ejemplo n.º 1
0
    /// <summary>
    /// UI的入栈操作,此操作会显示一个面板
    /// </summary>
    /// <param name="nextPanel">要显示的面板</param>
    public void Push(BasePanel nextPanel)
    {
        if (stackPanel.Count > 0)
        {
            basePanel = stackPanel.Peek();
            basePanel.OnPause();
        }
        stackPanel.Push(nextPanel);
        GameObject panel = uIManager.GetSingleUI(nextPanel.UIType);

        nextPanel.Iniitalize(new UITool(panel));
        nextPanel.Iniitalize(this);
        nextPanel.Iniitalize(uIManager);
        nextPanel.OnEnter();
    }