private void DoLoadAsync() { var nextNode = m_WaitLoadList.First; LinkedListNode <IRes> currentNode = null; while (nextNode != null) { currentNode = nextNode; IRes res = currentNode.Value; nextNode = currentNode.Next; if (res.IsDependResLoadFinish()) { m_WaitLoadList.Remove(currentNode); if (res.resState != eResState.kReady) { res.RegisteResListener(OnResLoadFinish); res.LoadAsync(); } else { --m_LoadingCount; } } } }
private void DoLoadAsync() { if (mLoadingCount == 0) { //ResMgr.Instance.timeDebugger.End(); //ResMgr.Instance.timeDebugger.Dump(-1); if (mListener != null) { Action callback = mListener; mListener = null; callback(); } return; } var nextNode = mWaitLoadList.First; LinkedListNode <IRes> currentNode = null; while (nextNode != null) { currentNode = nextNode; IRes res = currentNode.Value; nextNode = currentNode.Next; if (res.IsDependResLoadFinish()) { mWaitLoadList.Remove(currentNode); if (res.State != ResState.Ready) { res.RegisteResListener(OnResLoadFinish); res.LoadAsync(); } else { --mLoadingCount; } } } }
private void DoLoadAsync() { if (m_LoadingCount == 0) { if (m_Listener != null) { Action callback = m_Listener; m_Listener = null; callback(); } return; } var nextNode = m_WaitLoadList.First; LinkedListNode <IRes> currentNode = null; while (nextNode != null) { currentNode = nextNode; IRes res = currentNode.Value; nextNode = currentNode.Next; if (res.IsDependResLoadFinish()) { m_WaitLoadList.Remove(currentNode); if (res.State != ResState.Ready) { res.RegisteOnResLoadDoneEvent(OnResLoadFinish); res.LoadAsync(); } else { --m_LoadingCount; } } } }