AlicizaX/Client/Packages/com.alicizax.unity.resource/Runtime/Update/EventArgs/AssetPatchStatesChangeEventArgs.cs
2025-04-28 19:45:45 +08:00

44 lines
1.2 KiB
C#

using AlicizaX.Event.Runtime;
using AlicizaX;
namespace AlicizaX.Resource.Runtime
{
/// <summary>
/// 补丁流程步骤改变
/// </summary>
[UnityEngine.Scripting.Preserve]
public sealed class AssetPatchStatesChangeEventArgs : GameEventArgs
{
public override void Clear()
{
CurrentStates = EPatchStates.CreateDownloader;
}
public static readonly string EventId = typeof(AssetPatchStatesChangeEventArgs).FullName;
public override string Id
{
get { return EventId; }
}
/// <summary>
/// 当前步骤
/// </summary>
public EPatchStates CurrentStates { get; private set; }
/// <summary>
/// 创建补丁流程步骤改变
/// </summary>
/// <param name="packageName">包名称</param>
/// <param name="currentStates">当前步骤</param>
/// <returns></returns>
public static AssetPatchStatesChangeEventArgs Create(EPatchStates currentStates)
{
var assetPatchStatesChange = MemoryPool.Acquire<AssetPatchStatesChangeEventArgs>();
assetPatchStatesChange.CurrentStates = currentStates;
return assetPatchStatesChange;
}
}
}