using GFramework.Game.Abstractions.setting;
namespace GFramework.Game.setting.events;
///
/// 泛型设置变更事件
///
/// 设置节类型,必须实现ISettingsSection接口
/// 设置实例
public class SettingsChangedEvent(T settings) : ISettingsChangedEvent
where T : ISettingsSection
{
///
/// 获取类型化的设置实例
///
public T TypedSettings => (T)Settings;
///
/// 获取设置类型
///
public Type SettingsType => typeof(T);
///
/// 获取设置实例
///
public ISettingsSection Settings { get; } = settings;
///
/// 获取变更时间
///
public DateTime ChangedAt { get; } = DateTime.UtcNow;
}