//------------------------------------------------------------ // Game Framework // Copyright © 2013-2021 Jiang Yin. All rights reserved. // Homepage: https://gameframework.cn/ // Feedback: mailto:ellan@gameframework.cn //------------------------------------------------------------ using GameFramework; using GameFramework.Event; namespace UnityGameFramework.Runtime { /// /// 资源校验开始事件。 /// public sealed class ResourceVerifyStartEventArgs : GameEventArgs { /// /// 资源校验开始事件编号。 /// public static readonly int EventId = typeof(ResourceVerifyStartEventArgs).GetHashCode(); /// /// 初始化资源校验开始事件的新实例。 /// public ResourceVerifyStartEventArgs() { Count = 0; TotalLength = 0L; } /// /// 获取资源校验开始事件编号。 /// public override int Id { get { return EventId; } } /// /// 获取要校验资源的数量。 /// public int Count { get; private set; } /// /// 获取要校验资源的总大小。 /// public long TotalLength { get; private set; } /// /// 创建资源校验开始事件。 /// /// 内部事件。 /// 创建的资源校验开始事件。 public static ResourceVerifyStartEventArgs Create(GameFramework.Resource.ResourceVerifyStartEventArgs e) { ResourceVerifyStartEventArgs resourceVerifyStartEventArgs = ReferencePool.Acquire(); resourceVerifyStartEventArgs.Count = e.Count; resourceVerifyStartEventArgs.TotalLength = e.TotalLength; return resourceVerifyStartEventArgs; } /// /// 清理资源校验开始事件。 /// public override void Clear() { Count = 0; TotalLength = 0L; } } }