//------------------------------------------------------------ // Game Framework // Copyright © 2013-2021 loyalsoft. All rights reserved. // Homepage: http://www.game7000.com/ // Feedback: http://www.game7000.com/ //------------------------------------------------------------ using GameFramework; using GameFramework.Event; namespace UnityGameFramework.Runtime { /// /// 加载全局配置失败事件。 /// public sealed class LoadConfigFailureEventArgs : GameEventArgs { /// /// 加载全局配置失败事件编号。 /// public static readonly int EventId = typeof(LoadConfigFailureEventArgs).GetHashCode(); /// /// 初始化加载全局配置失败事件的新实例。 /// public LoadConfigFailureEventArgs() { ConfigAssetName = null; ErrorMessage = null; UserData = null; } /// /// 获取加载全局配置失败事件编号。 /// public override int Id { get { return EventId; } } /// /// 获取全局配置资源名称。 /// public string ConfigAssetName { get; private set; } /// /// 获取错误信息。 /// public string ErrorMessage { get; private set; } /// /// 获取用户自定义数据。 /// public object UserData { get; private set; } /// /// 创建加载全局配置失败事件。 /// /// 内部事件。 /// 创建的加载全局配置失败事件。 public static LoadConfigFailureEventArgs Create(ReadDataFailureEventArgs e) { LoadConfigFailureEventArgs loadConfigFailureEventArgs = ReferencePool.Acquire(); loadConfigFailureEventArgs.ConfigAssetName = e.DataAssetName; loadConfigFailureEventArgs.ErrorMessage = e.ErrorMessage; loadConfigFailureEventArgs.UserData = e.UserData; return loadConfigFailureEventArgs; } /// /// 清理加载全局配置失败事件。 /// public override void Clear() { ConfigAssetName = null; ErrorMessage = null; UserData = null; } } }