public void LoadSync() { while (mWaitLoadList.Count > 0) { var first = mWaitLoadList.First.Value; --mLoadingCount; mWaitLoadList.RemoveFirst(); if (first == null) { return; } if (first.LoadSync()) { first.AcceptLoaderStrategySync(this, mStrategy); } } mStrategy.OnAllTaskFinish(this); }
private void OnResLoadFinish(bool result, IRes res) { --mLoadingCount; res.AcceptLoaderStrategyAsync(this, mStrategy); DoLoadAsync(); if (mLoadingCount == 0) { RemoveAllCallbacks(false); mListener.InvokeGracefully(); mStrategy.OnAllTaskFinish(this); } }
private void OnResLoadFinish(bool result, IRes res) { --mLoadingCount; res.AcceptLoaderStrategyAsync(this, mStrategy); DoLoadAsync(); if (mLoadingCount == 0) { RemoveAllCallbacks(false); //ResMgr.Instance.timeDebugger.End(); //ResMgr.Instance.timeDebugger.Dump(-1); if (mListener != null) { mListener(); mListener = null; } mStrategy.OnAllTaskFinish(this); } }