Esempio n. 1
0
        public static void Update()
        {
            for (int i = 0; i < s_LoadingAssetDict.Count;)
            {
                if (s_LoadingAssetDict[i].Update())
                {
                    s_LoadingAssetDict.RemoveAt(i);
                    continue;
                }
                i++;
            }

            int loadlen = s_LoadingAssetDict.Count;
            int waitlen = s_WaitingLoaderList.Count;

            while (loadlen < s_MaxSyncLoader && waitlen > 0)
            {
                BaseLoader loader = s_WaitingLoaderList[waitlen - 1];
                loader.Start();

                s_LoadingAssetDict.Add(loader);
                loadlen++;

                s_WaitingLoaderList.RemoveAt(waitlen - 1);
                waitlen--;
            }
        }
Esempio n. 2
0
 static bool FindBaseLoader(string path, List <BaseLoader> list, out BaseLoader loader)
 {
     loader = null;
     foreach (var load in list)
     {
         if (load.Path.Equals(path))
         {
             loader = load;
             return(true);
         }
     }
     return(false);
 }