Ejemplo n.º 1
0
 private static IEnumerator Record_DownloadProgress_Async(LoaderRequest rRequest, UnityWebRequest rWebRequest)
 {
     while (!rRequest.IsDone)
     {
         UtilTool.SafeExecute(rRequest.DownloadProgress, rWebRequest.downloadProgress);
         yield return(0);
     }
     rWebRequest = null;
 }
 public T Alloc()
 {
     if (mStack.Count == 0)
     {
         return(UtilTool.SafeExecute(mActionAlloc));
     }
     else
     {
         return(mStack.Pop());
     }
 }
Ejemplo n.º 3
0
        private static IEnumerator Record_DownloadProgress_Async(LoaderRequest rRequest, UnityWebRequest rWebRequest)
        {
            while (!rRequest.IsDone)
            {
                try { UtilTool.SafeExecute(rRequest.DownloadProgress, rWebRequest.downloadProgress); }
                catch (System.Exception) {}

                yield return(new WaitForEndOfFrame());
            }
            rWebRequest = null;
        }
 public void Destroy()
 {
     if (mStack == null)
     {
         return;
     }
     foreach (var rItem in mStack)
     {
         UtilTool.SafeExecute(mActionDestroy, rItem);
     }
     mStack.Clear();
 }
Ejemplo n.º 5
0
        public T Alloc()
        {
            T rElement = default(T);

            if (mStack.Count == 0)
            {
                rElement = new T();
            }
            else
            {
                rElement = mStack.Pop();
            }
            UtilTool.SafeExecute(mActionAlloc, rElement);
            return(rElement);
        }