コード例 #1
0
 public void RemoveOnLoadCallBack(OnUIResourceLoaded onLoad)
 {
     if (null != m_onLoadCallBack)
     {
         m_onLoadCallBack -= onLoad;
     }
 }
コード例 #2
0
 protected void AddOnLoadCallBack(OnUIResourceLoaded onLoad)
 {
     if (null != m_onLoadCallBack)
     {
         m_onLoadCallBack -= onLoad;
     }
     m_onLoadCallBack += onLoad;
 }
コード例 #3
0
ファイル: ZGUIManager.cs プロジェクト: tsinglee2009/ZGUI
        public void RemoveLoadUICallBack(uint eResType, OnUIResourceLoaded onLoad)
        {
            ZGUIResourceManager resMgr = ZGUIResourceManager.GetResMgr(eResType);

            if (null != resMgr)
            {
                resMgr.RemoveOnLoadCallBack(onLoad);
            }
        }
コード例 #4
0
ファイル: ZGUIManager.cs プロジェクト: tsinglee2009/ZGUI
        public bool LoadUIResource(uint eResType, uint nResId, OnUIResourceLoaded onLoad)
        {
            ZGUIResourceManager resMgr = ZGUIResourceManager.GetResMgr(eResType);

            if (null != resMgr)
            {
                return(resMgr.LoadResource(nResId, onLoad));
            }
            return(false);
        }
コード例 #5
0
ファイル: ZGUIManager.cs プロジェクト: tsinglee2009/ZGUI
        /// <summary>
        /// 加载UI资源
        /// </summary>
        public bool LoadUIResource(uint eResType, string strResourceName, OnUIResourceLoaded onLoad)
        {
            ZGUIResourceManager resMgr = ZGUIResourceManager.GetResMgr(eResType);

            if (null != resMgr)
            {
                return(resMgr.LoadResource(strResourceName, onLoad));
            }
            return(false);
        }
コード例 #6
0
        public bool LoadResource(uint resId, OnUIResourceLoaded onLoad)
        {
            if (Contains(resId))
            {
                return(true);
            }
            else
            {
                if (null != onLoad)
                {
                    AddOnLoadCallBack(onLoad);
                }

                Resource res = GameDownloadMgr.LoadResource(resId, OnLoadResource);
                if (null != res)
                {
                    OnLoadResource(res);
                    return(true);
                }

                return(false);
            }
        }
コード例 #7
0
        // 加载资源
        public bool LoadResource(string strResName, OnUIResourceLoaded onLoad)
        {
            uint nResId = GetUIResIdByName(ref strResName);

            return(LoadResource(nResId, onLoad));
        }