Ejemplo n.º 1
0
        public static float GetDownloadedSize(AbUnit unit = AbUnit.Byte)
        {
            float size = 0;
            var   e    = _downloads.GetEnumerator();

            while (e.MoveNext())
            {
                size += e.Current.Value.downloadedSize;
            }

            e.Dispose();

            for (int i = 0; i < (int)unit; i++)
            {
                size /= 1024;
            }

            return(size);
        }
Ejemplo n.º 2
0
 public static float GetDownloadProgress(out float downloadedSize, out float contentSize, out AbUnit unit)
 {
     contentSize    = AbLoaderManager.GetContentSize();
     unit           = AbLoaderManager.ToUnit(ref contentSize);
     downloadedSize = AbLoaderManager.GetDownloadedSize(unit);
     return(AbLoaderManager.GetDownloadProgress());
 }