//------------------------------------------------------------
// Game Framework
// Copyright © 2013-2021 loyalsoft. All rights reserved.
// Homepage: http://www.game7000.com/
// Feedback: http://www.game7000.com/
//------------------------------------------------------------
namespace GameFramework.Resource
{
///
/// 资源应用成功事件。
///
public sealed class ResourceApplySuccessEventArgs : GameFrameworkEventArgs
{
///
/// 初始化资源应用成功事件的新实例。
///
public ResourceApplySuccessEventArgs()
{
Name = null;
ApplyPath = null;
ResourcePackPath = null;
Length = 0;
CompressedLength = 0;
}
///
/// 获取资源名称。
///
public string Name
{
get;
private set;
}
///
/// 获取资源应用后存放路径。
///
public string ApplyPath
{
get;
private set;
}
///
/// 获取资源包路径。
///
public string ResourcePackPath
{
get;
private set;
}
///
/// 获取资源大小。
///
public int Length
{
get;
private set;
}
///
/// 获取压缩后大小。
///
public int CompressedLength
{
get;
private set;
}
///
/// 创建资源应用成功事件。
///
/// 资源名称。
/// 资源应用后存放路径。
/// 资源包路径。
/// 资源大小。
/// 压缩后大小。
/// 创建的资源应用成功事件。
public static ResourceApplySuccessEventArgs Create(string name, string applyPath, string resourcePackPath, int length, int compressedLength)
{
ResourceApplySuccessEventArgs resourceApplySuccessEventArgs = ReferencePool.Acquire();
resourceApplySuccessEventArgs.Name = name;
resourceApplySuccessEventArgs.ApplyPath = applyPath;
resourceApplySuccessEventArgs.ResourcePackPath = resourcePackPath;
resourceApplySuccessEventArgs.Length = length;
resourceApplySuccessEventArgs.CompressedLength = compressedLength;
return resourceApplySuccessEventArgs;
}
///
/// 清理资源应用成功事件。
///
public override void Clear()
{
Name = null;
ApplyPath = null;
ResourcePackPath = null;
Length = 0;
CompressedLength = 0;
}
}
}