//------------------------------------------------------------ // 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 LoadResourceAgentHelperReadBytesCompleteEventArgs : GameFrameworkEventArgs { private byte[] m_Bytes; /// /// 初始化加载资源代理辅助器异步读取资源二进制流完成事件的新实例。 /// public LoadResourceAgentHelperReadBytesCompleteEventArgs() { m_Bytes = null; } /// /// 创建加载资源代理辅助器异步读取资源二进制流完成事件。 /// /// 资源的二进制流。 /// 创建的加载资源代理辅助器异步读取资源二进制流完成事件。 public static LoadResourceAgentHelperReadBytesCompleteEventArgs Create(byte[] bytes) { LoadResourceAgentHelperReadBytesCompleteEventArgs loadResourceAgentHelperReadBytesCompleteEventArgs = ReferencePool.Acquire(); loadResourceAgentHelperReadBytesCompleteEventArgs.m_Bytes = bytes; return loadResourceAgentHelperReadBytesCompleteEventArgs; } /// /// 清理加载资源代理辅助器异步读取资源二进制流完成事件。 /// public override void Clear() { m_Bytes = null; } /// /// 获取资源的二进制流。 /// /// 资源的二进制流。 public byte[] GetBytes() { return m_Bytes; } } }