Exemplo n.º 1
0
        private void OnLoaded2(LoadingData loadingData, Object obj)
        {
            int  key  = loadingData.key;
            bool flag = mLoadings.Remove(key);

            loadingData.Clear();
            cached_loading_lists.Enqueue(loadingData);
            if (!flag)
            {
                Debug.LogErrorFormat("[ResourcesHolder] in OnLoaded() No callbacks found for '{0}' !",
                                     HashString.GetString(key));
            }
        }
Exemplo n.º 2
0
 private bool GetLoadDelegateList(int key, out LoadingData callbackList)
 {
     callbackList = null;
     //List<OnResourcesLoadedDelegate<Object>> callbacks;
     if (mLoadings.TryGetValue(key, out callbackList))
     {
         return(true);
     }
     callbackList = 0 < cached_loading_lists.Count ? cached_loading_lists.Dequeue() : new LoadingData();
     callbackList.onPreCallbacks  = OnLoaded1;
     callbackList.onPostCallbacks = OnLoaded2;
     mLoadings.Add(key, callbackList);
     callbackList.Clear();
     return(false);
 }