using AlicizaX.Event.Runtime; using AlicizaX.Runtime; namespace AlicizaX.Resource.Runtime { /// /// 发现更新文件 /// [UnityEngine.Scripting.Preserve] public sealed class AssetFoundUpdateFilesEventArgs : GameEventArgs { /// /// 总数量 /// public int TotalCount { get; private set; } /// /// 总大小 /// public long TotalSizeBytes { get; private set; } /// /// 包名称 /// public string PackageName { get; set; } public override void Clear() { PackageName = null; TotalCount = 0; TotalSizeBytes = 0; } /// /// 发现更新文件事件编号 /// public static readonly string EventId = typeof(AssetFoundUpdateFilesEventArgs).FullName; public override string Id { get { return EventId; } } /// /// 创建发现更新文件 /// /// 包名称 /// 总数量 /// 总大小 /// public static AssetFoundUpdateFilesEventArgs Create(string packageName, int totalCount, long totalSizeBytes) { var foundUpdateFiles = ReferencePool.Acquire(); foundUpdateFiles.TotalCount = totalCount; foundUpdateFiles.TotalSizeBytes = totalSizeBytes; foundUpdateFiles.PackageName = packageName; return foundUpdateFiles; } } }