update operation system

新增字段PackageName
pull/455/head
何冠峰 2024-12-27 17:23:55 +08:00
parent 10750a0123
commit fe352ceb84
2 changed files with 13 additions and 6 deletions

View File

@ -42,6 +42,17 @@ namespace YooAsset
/// </summary> /// </summary>
public float Progress { get; protected set; } public float Progress { get; protected set; }
/// <summary>
/// 所属包裹名称
/// </summary>
public string PackageName
{
get
{
return _packageName;
}
}
/// <summary> /// <summary>
/// 是否已经完成 /// 是否已经完成
/// </summary> /// </summary>
@ -98,10 +109,6 @@ namespace YooAsset
throw new System.NotImplementedException(this.GetType().Name); throw new System.NotImplementedException(this.GetType().Name);
} }
internal string GetPackageName()
{
return _packageName;
}
internal void SetPackageName(string packageName) internal void SetPackageName(string packageName)
{ {
_packageName = packageName; _packageName = packageName;

View File

@ -112,7 +112,7 @@ namespace YooAsset
// 终止临时队列里的任务 // 终止临时队列里的任务
foreach (var operation in _newList) foreach (var operation in _newList)
{ {
if (operation.GetPackageName() == packageName) if (operation.PackageName == packageName)
{ {
operation.SetAbort(); operation.SetAbort();
} }
@ -121,7 +121,7 @@ namespace YooAsset
// 终止正在进行的任务 // 终止正在进行的任务
foreach (var operation in _operations) foreach (var operation in _operations)
{ {
if (operation.GetPackageName() == packageName) if (operation.PackageName == packageName)
{ {
operation.SetAbort(); operation.SetAbort();
} }