Esempio n. 1
0
        public bool Init() //初始化
        {
            if (obj == null)
            {
                obj = GameMain.Instance.LoadMenu(menu, parms, false).obj; //加载新的预设体
            }
            MenuBase iMenu = obj.GetComponent <MenuBase>();

            if (iMenu != null)
            {
                if (iMenu.Init(parms) == false)
                {
                    return(false);
                }
                var popup = parms.GetPopup();
                if (popup != null)
                {
                    Popup.Instance.PushStacks(popup);
                    parms.RemovePopup();
                }
            }
            else
            {
                Debug.LogWarningFormat("not found IMenu componet.({0})", obj);
                return(false);
            }
            return(true);
        }