//------------------------------------------------------------ // 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 LoadConfigUpdateEventArgs : GameEventArgs { /// /// 加载全局配置失败事件编号。 /// public static readonly int EventId = typeof(LoadConfigUpdateEventArgs).GetHashCode(); /// /// 初始化加载全局配置更新事件的新实例。 /// public LoadConfigUpdateEventArgs() { ConfigAssetName = null; Progress = 0f; UserData = null; } /// /// 获取加载全局配置失败事件编号。 /// public override int Id { get { return EventId; } } /// /// 获取全局配置资源名称。 /// public string ConfigAssetName { get; private set; } /// /// 获取加载全局配置进度。 /// public float Progress { get; private set; } /// /// 获取用户自定义数据。 /// public object UserData { get; private set; } /// /// 创建加载全局配置更新事件。 /// /// 内部事件。 /// 创建的加载全局配置更新事件。 public static LoadConfigUpdateEventArgs Create(ReadDataUpdateEventArgs e) { LoadConfigUpdateEventArgs loadConfigUpdateEventArgs = ReferencePool.Acquire(); loadConfigUpdateEventArgs.ConfigAssetName = e.DataAssetName; loadConfigUpdateEventArgs.Progress = e.Progress; loadConfigUpdateEventArgs.UserData = e.UserData; return loadConfigUpdateEventArgs; } /// /// 清理加载全局配置更新事件。 /// public override void Clear() { ConfigAssetName = null; Progress = 0f; UserData = null; } } }