private void LoadAsync(string assetName, IResLoadListener listener, bool isKeepInMemory, Type type) { for (int i = 0; i < mInLoads.Count; i++) { if (mInLoads[i].assetName == assetName) { mInLoads[i].AddListener(listener); return; } } foreach (RequestInfo info in mWaitting) { if (info.assetName == assetName) { info.AddListener(listener); return; } } RequestInfo requestInfo = new RequestInfo(); requestInfo.assetName = assetName; requestInfo.AddListener(listener); requestInfo.isKeepInMemory = isKeepInMemory; requestInfo.type = type; mWaitting.Enqueue(requestInfo); }
private void LoadAsync(string assetName, IResLoadListener listener,bool isKeepInMemory,Type type) { for (int i = 0; i < mInLoads.Count; i++) { if (mInLoads[i].assetName == assetName) { mInLoads[i].AddListener(listener); return; } } foreach(RequestInfo info in mWaitting) { if (info.assetName == assetName) { info.AddListener(listener); return; } } RequestInfo requestInfo = new RequestInfo(); requestInfo.assetName = assetName; requestInfo.AddListener(listener); requestInfo.isKeepInMemory = isKeepInMemory; requestInfo.type = type; mWaitting.Enqueue(requestInfo); }