private void CheckLoadingDic(LoadFile loadFile, bool isCheckNext) { if (loadFile != null) { Queue <LoadFile> waittingQueue = null; Dictionary <string, LoadFile> loadingDic = null; byte maxCount = 0; string loadFilePath = loadFile.GetLoadFilePath(); switch (loadFile.Behaviour) { case LoadBehaviour.ContentLoadFromLoacal_WWW: case LoadBehaviour.ContentLoadFromLoacal_LoadBundleFile: if (!File.Exists(loadFilePath)) { loadFile.ExecuteOnFileLoaded(); return; } else { waittingQueue = localWaittingQueue; loadingDic = localLoadingDic; maxCount = UnityExecuteLoad.MAX_EXECUTE_COUNT; } break; case LoadBehaviour.DownloadFile_WWW: case LoadBehaviour.ContentLoadFromServer_WWW: waittingQueue = serverWaittingQueue; loadingDic = serverLoadingDic; maxCount = UnityExecuteLoad.MAX_EXECUTE_COUNT; break; case LoadBehaviour.DownloadFile_ResumeBrokenTransfer_HttpWebRequest: waittingQueue = serverWaittingQueue; loadingDic = serverLoadingDic; maxCount = ExecuteLoad_HttpWebRequest.MAX_EXECUTE_COUNT; break; } if (waittingQueue != null && loadingDic != null && maxCount != 0) { LoadFile toCheckLoadFile = loadFile; if (isCheckNext) { toCheckLoadFile = waittingQueue.Count > 0 ? waittingQueue.Dequeue() : null; } if (toCheckLoadFile != null) { if (loadingDic.Count <= maxCount) { loadFilePath = toCheckLoadFile.GetLoadFilePath(); if (!loadingDic.ContainsKey(loadFilePath)) { loadingDic.Add(loadFilePath, toCheckLoadFile); StartCoroutine(AnalyseAndExecute(toCheckLoadFile, loadingDic)); } } else { waittingQueue.Enqueue(toCheckLoadFile); } } } } }
public ExecuteLoad_BundleFile(LoadFile loadFile) : base(loadFile) { }
protected UnityExecuteLoad(LoadFile loadFile) : base(loadFile) { this.loadFile = loadFile; }
public ExecuteLoad_HttpWebRequest(LoadFile loadFile) : base(loadFile) { this.loadFile = loadFile; }
protected ExecuteLoadByLoadFile(LoadFile loadFile) { this.loadFile = loadFile; }