private void onLoadHandler(LoadedData data) { Debug.Log(data.FilePath + " LoadOver!"); if (tobeLoadInfoQueue.Count == 0) { if (curLoadInfo != null && curLoadInfo.OnLoadHandler != null) { curLoadInfo.OnLoadHandler(data); curLoadInfo = null; } if (completeHandler != null) { completeHandler(); Debug.Log("Load Complete!"); } } else { //调用一下外部的回调; if (curLoadInfo != null && curLoadInfo.OnLoadHandler != null) { curLoadInfo.OnLoadHandler(data); } //继续加载下一个; curLoadInfo = tobeLoadInfoQueue.Dequeue(); ResManager.Instance.LoadRes(curLoadInfo.Path, onLoadHandler); } }
/// <summary> /// 开始加载; /// </summary> /// <param name="callback"></param> public void StartLoad(Action overHandler = null, bool needProgress = true, string loadText = "") { completeHandler = overHandler; showProgress = needProgress; totalCount = (int)tobeLoadInfoQueue.Count; if (totalCount > 0) { //if (UI_View == null) //{ // UI_View = new LoadingView(); //} //if (showProgress) //{ // UI_View.InitProgress(totalCount); // UI_View.UpdateProgress(0); // UI_View.Show(true); //} curLoadInfo = tobeLoadInfoQueue.Dequeue(); ioo.resourceManager.LoadRes(curLoadInfo.Path, onLoadHandler); } else { if (completeHandler != null) { completeHandler(); Debugger.Log("Load Complete!"); } } }
private void onLoadHandler(LoadedData data) { Log.Hsz(data.FilePath + " LoadOver!"); if (tobeLoadInfoQueue.Count == 0) { //if (showProgress) //{ // UI_View.UpdateProgress(totalCount); // UI_View.Show(false); //} if (curLoadInfo != null && curLoadInfo.OnLoadHandler != null) { curLoadInfo.OnLoadHandler(data); curLoadInfo = null; } if (completeHandler != null) { completeHandler(); Log.Hsz("Load Complete!"); } } else { //if (showProgress) //{ // UI_View.UpdateProgress(totalCount - tobeLoadInfoQueue.Count); //} //调用一下外部的回调; if (curLoadInfo != null && curLoadInfo.OnLoadHandler != null) { curLoadInfo.OnLoadHandler(data); } //继续加载下一个; curLoadInfo = tobeLoadInfoQueue.Dequeue(); if (curLoadInfo.XmlResolver != null) { ResManager.Instance.LoadXML(curLoadInfo.Path, onLoadHandler, curLoadInfo.XmlResolver); } else { ResManager.Instance.LoadRes(curLoadInfo.Path, onLoadHandler); } } }
private void onLoadHandler(LoadedData data) { Debugger.Log(data.FilePath + " LoadOver!"); if (tobeLoadInfoQueue.Count == 0) { //if (showProgress) //{ // UI_View.UpdateProgress(totalCount); // UI_View.Show(false); //} if (curLoadInfo != null && curLoadInfo.OnLoadHandler != null) { curLoadInfo.OnLoadHandler(data); curLoadInfo = null; } if (completeHandler != null) { completeHandler(); Debugger.Log("Load Complete!"); } } else { //if (showProgress) //{ // UI_View.UpdateProgress(totalCount - tobeLoadInfoQueue.Count); //} //调用一下外部的回调; if (curLoadInfo != null && curLoadInfo.OnLoadHandler != null) { curLoadInfo.OnLoadHandler(data); } //继续加载下一个; curLoadInfo = tobeLoadInfoQueue.Dequeue(); ioo.resourceManager.LoadRes(curLoadInfo.Path, onLoadHandler); } }
/// <summary> /// 开始加载; /// </summary> /// <param name="callback"></param> public void StartLoad(Action overHandler = null, bool needProgress = true, string loadText = "") { completeHandler = overHandler; showProgress = needProgress; totalCount = tobeLoadInfoQueue.Count; if (totalCount > 0) { curLoadInfo = tobeLoadInfoQueue.Dequeue(); ResManager.Instance.LoadRes(curLoadInfo.Path, onLoadHandler); } else { if (completeHandler != null) { completeHandler(); Debug.Log("Load Complete!"); } } }
/// <summary> /// 开始加载; /// </summary> /// <param name="callback"></param> public void StartLoad(Action overHandler, bool needProgress = true, string loadText = "") { completeHandler = overHandler; showProgress = needProgress; totalCount = tobeLoadInfoQueue.Count; if (totalCount > 0) { //if (UI_View == null) //{ // UI_View = new LoadingView(); //} //if (showProgress) //{ // UI_View.InitProgress(totalCount); // UI_View.UpdateProgress(0); // UI_View.Show(true); //} curLoadInfo = tobeLoadInfoQueue.Dequeue(); if (curLoadInfo.XmlResolver != null) { ResManager.Instance.LoadXML(curLoadInfo.Path, onLoadHandler, curLoadInfo.XmlResolver); } else { ResManager.Instance.LoadRes(curLoadInfo.Path, onLoadHandler); } } else { if (completeHandler != null) { completeHandler(); Log.Hsz("Load Complete!"); } } }