mirror of https://github.com/tuyoogame/YooAsset
update yooasset2.0
parent
e358bbf46c
commit
e207d834bd
|
@ -4,7 +4,7 @@ using System.Collections.Generic;
|
|||
|
||||
namespace YooAsset
|
||||
{
|
||||
public class RemoteTools
|
||||
public class RequestHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// 记录网络请求失败事件的次数
|
|
@ -29,7 +29,7 @@ namespace YooAsset
|
|||
}
|
||||
internal override void Start()
|
||||
{
|
||||
RequestCount = RemoteTools.GetRequestFailedCount(_persistent.PackageName, nameof(DownloadManifestOperation));
|
||||
RequestCount = RequestHelper.GetRequestFailedCount(_persistent.PackageName, nameof(DownloadManifestOperation));
|
||||
_steps = ESteps.DownloadPackageHashFile;
|
||||
}
|
||||
internal override void Update()
|
||||
|
@ -58,7 +58,7 @@ namespace YooAsset
|
|||
_steps = ESteps.Done;
|
||||
Status = EOperationStatus.Failed;
|
||||
Error = _downloader1.GetError();
|
||||
RemoteTools.RecordRequestFailed(_persistent.PackageName, nameof(DownloadManifestOperation));
|
||||
RequestHelper.RecordRequestFailed(_persistent.PackageName, nameof(DownloadManifestOperation));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -89,7 +89,7 @@ namespace YooAsset
|
|||
_steps = ESteps.Done;
|
||||
Status = EOperationStatus.Failed;
|
||||
Error = _downloader2.GetError();
|
||||
RemoteTools.RecordRequestFailed(_persistent.PackageName, nameof(DownloadManifestOperation));
|
||||
RequestHelper.RecordRequestFailed(_persistent.PackageName, nameof(DownloadManifestOperation));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -39,7 +39,7 @@ namespace YooAsset
|
|||
}
|
||||
internal override void Start()
|
||||
{
|
||||
RequestCount = RemoteTools.GetRequestFailedCount(_packageName, nameof(LoadRemoteManifestOperation));
|
||||
RequestCount = RequestHelper.GetRequestFailedCount(_packageName, nameof(LoadRemoteManifestOperation));
|
||||
_steps = ESteps.DownloadPackageHashFile;
|
||||
}
|
||||
internal override void Update()
|
||||
|
@ -90,7 +90,7 @@ namespace YooAsset
|
|||
_steps = ESteps.Done;
|
||||
Status = EOperationStatus.Failed;
|
||||
Error = _downloader.GetError();
|
||||
RemoteTools.RecordRequestFailed(_packageName, nameof(LoadRemoteManifestOperation));
|
||||
RequestHelper.RecordRequestFailed(_packageName, nameof(LoadRemoteManifestOperation));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace YooAsset
|
|||
}
|
||||
internal override void Start()
|
||||
{
|
||||
RequestCount = RemoteTools.GetRequestFailedCount(_packageName, nameof(QueryRemotePackageHashOperation));
|
||||
RequestCount = RequestHelper.GetRequestFailedCount(_packageName, nameof(QueryRemotePackageHashOperation));
|
||||
_steps = ESteps.DownloadPackageHash;
|
||||
}
|
||||
internal override void Update()
|
||||
|
@ -62,7 +62,7 @@ namespace YooAsset
|
|||
_steps = ESteps.Done;
|
||||
Status = EOperationStatus.Failed;
|
||||
Error = _downloader.GetError();
|
||||
RemoteTools.RecordRequestFailed(_packageName, nameof(QueryRemotePackageHashOperation));
|
||||
RequestHelper.RecordRequestFailed(_packageName, nameof(QueryRemotePackageHashOperation));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace YooAsset
|
|||
}
|
||||
internal override void Start()
|
||||
{
|
||||
RequestCount = RemoteTools.GetRequestFailedCount(_packageName, nameof(QueryRemotePackageVersionOperation));
|
||||
RequestCount = RequestHelper.GetRequestFailedCount(_packageName, nameof(QueryRemotePackageVersionOperation));
|
||||
_steps = ESteps.DownloadPackageVersion;
|
||||
}
|
||||
internal override void Update()
|
||||
|
@ -62,7 +62,7 @@ namespace YooAsset
|
|||
_steps = ESteps.Done;
|
||||
Status = EOperationStatus.Failed;
|
||||
Error = _downloader.GetError();
|
||||
RemoteTools.RecordRequestFailed(_packageName, nameof(QueryRemotePackageVersionOperation));
|
||||
RequestHelper.RecordRequestFailed(_packageName, nameof(QueryRemotePackageVersionOperation));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue