mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
Update DownloaderOperation.cs
This commit is contained in:
@@ -34,6 +34,7 @@ namespace YooAsset
|
||||
private int _lastDownloadCount = 0;
|
||||
private long _cachedDownloadBytes = 0;
|
||||
private int _cachedDownloadCount = 0;
|
||||
private float _currentSpeed = 0f;
|
||||
private ESteps _steps = ESteps.None;
|
||||
|
||||
|
||||
@@ -62,6 +63,14 @@ namespace YooAsset
|
||||
{
|
||||
get { return _lastDownloadBytes; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 当前下载器下载速度
|
||||
/// </summary>
|
||||
public float CurrentSpeed
|
||||
{
|
||||
get { return _currentSpeed; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 当下载器结束(无论成功或失败)
|
||||
@@ -150,6 +159,7 @@ namespace YooAsset
|
||||
_cachedDownloadCount++;
|
||||
_cachedDownloadBytes += bundleInfo.Bundle.FileSize;
|
||||
}
|
||||
_currentSpeed = downloadBytes / UnityEngine.Time.time;
|
||||
|
||||
// 移除已经完成的下载器(无论成功或失败)
|
||||
foreach (var loader in _removeList)
|
||||
|
Reference in New Issue
Block a user