Exemplo n.º 1
0
        public virtual void Initialize()
        {
            AssetManager.Get();
            EventSystem.Get();

            GameStateManager.Get();
            LuaManager.Get();
            GuiManager.Get();
        }
Exemplo n.º 2
0
        public void MoveToFront()
        {
            int nOrder = GuiManager.Get().GetMaxOrderInLayer(m_eGuiLayer) + 1;

            if (nOrder >= ms_nMaxOpenOrder)
            {
                GuiManager.Get().ResetOrderInLayer(m_eGuiLayer);
                nOrder = GuiManager.Get().GetMaxOrderInLayer(m_eGuiLayer) + 1;
            }

            SetOpenOrder(nOrder);
        }
Exemplo n.º 3
0
        public GuiObject LoadGuiObject(string a_strName, string a_strPath)
        {
            GuiObject guiObject = FindGuiObject(a_strName);

            if (guiObject == null)
            {
                AssetObj assetObj = AssetManager.Get().CreateAsset(a_strPath);
                Assert.IsTrue(assetObj.LoadState != EAssetLoadState.Loading);

                GameObject objRoot = assetObj.gameObject;
                Assert.IsTrue(objRoot != null);

                guiObject = objRoot.GetComponent <GuiObject>();
                Assert.IsNotNull(guiObject);
                objRoot.transform.SetParent(GuiManager.Get().UIRoot.transform, false);
                guiObject.Initialize(a_strName);

                GuiInfo guiInfo = new GuiInfo();
                guiInfo.assetObj  = assetObj;
                guiInfo.guiObject = guiObject;
                m_listGuiInfos.Add(guiInfo);
            }
            return(guiObject);
        }