/// <summary>
    /// 打开面板
    /// </summary>
    /// <param name="pageLoadPath">加载的相对路径</param>
    public void ShowPage(string pkg, string pageName)
    {
        FairyUI currXPage = CheckPageExist(pageName);

        if (currXPage != null)
        {
            if (currXPage.fairyUIState == FairyUIState.CLOSE || currXPage.needPool)
            {
                CheckUIMode(currXPage);
                currXPage.Show();
                currShowUI = currXPage;
                Debug.Log("直接打开");
            }
        }
        else
        {
            currXPage = new FairyUI();
            currXPage.InitUI(pkg, pageName);
            currXPage.Awake();

            LoadUI(pkg, pageName, delegate(GObject obj)
            {
                currXPage.AddGObject(obj.asCom);
                allPages.Add(pageName, currXPage);
                CheckUIMode(currXPage);
                currXPage.Start();
                currShowUI = currXPage;
            });
        }
    }
Beispiel #2
0
 static int InitUI(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         FairyUI obj  = (FairyUI)ToLua.CheckObject <FairyUI>(L, 1);
         string  arg0 = ToLua.CheckString(L, 2);
         string  arg1 = ToLua.CheckString(L, 3);
         obj.InitUI(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }