Пример #1
0
        // 内部接口
        private void addFormNoReady(Form form)
        {
            UILayer layer = getLayer(m_UIAttrs.m_id2AttrDic[form.id].m_canvasID, m_UIAttrs.m_id2AttrDic[form.id].m_LayerID);

            form.uiLayer = layer;
            layer.addForm(form);

            m_id2FormDic[form.id] = form;
            form.init();        // 初始化
        }
Пример #2
0
        public UILayer getLayer(UICanvasID canvasID, UILayerID layerID)
        {
            UILayer layer = null;

            if (UICanvasID.eCanvas_50 <= canvasID && canvasID <= UICanvasID.eCanvas_100)
            {
                if (UILayerID.eBtmLayer <= layerID && layerID <= UILayerID.eTopLayer)
                {
                    layer = m_canvasList[(int)canvasID].layerList[(int)layerID];
                }
            }

            return(layer);
        }
Пример #3
0
        protected void exitFormInternal(UIFormID ID)
        {
            Form win = getForm(ID);

            if (win != null)
            {
                // 清理列表
                UILayer layer = win.uiLayer;
                layer.winDic.Remove(ID);
                // 释放界面资源
                win.onExit();
                UtilApi.Destroy(win.m_GUIWin.m_uiRoot);
                win.m_GUIWin.m_uiRoot = null;
                // 释放加载的资源
                //string path = m_UIAttrs.getPath(ID);
                //if (path != null)
                //{
                //    Ctx.m_instance.m_resLoadMgr.unload(path);
                //}
                UtilApi.UnloadUnusedAssets();       // 异步卸载共用资源
                m_id2FormDic.Remove(ID);
                win = null;
            }
        }