mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-23 03:04:29 +08:00
- 将所有小写的命名空间导入更正为首字母大写格式 - 统一 GFramework 框架的命名空间引用规范 - 修复 core、ecs、godot 等模块的命名空间导入错误 - 标准化文档示例代码中的 using 语句格式 - 确保所有文档中的命名空间引用保持一致性 - 更新 global using 语句以匹配正确的命名空间格式
36 lines
942 B
C#
36 lines
942 B
C#
using GFramework.Game.Abstractions.Setting;
|
|
|
|
namespace GFramework.Game.Setting.Events;
|
|
|
|
/// <summary>
|
|
/// 表示设置重置事件
|
|
/// </summary>
|
|
/// <typeparam name="T">设置节类型</typeparam>
|
|
public class SettingsResetEvent<T>(T newSettings) : ISettingsChangedEvent
|
|
where T : ISettingsSection
|
|
{
|
|
/// <summary>
|
|
/// 获取重置后的新设置
|
|
/// </summary>
|
|
public T NewSettings { get; } = newSettings;
|
|
|
|
/// <summary>
|
|
/// 获取类型化的设置实例(返回新设置)
|
|
/// </summary>
|
|
public T TypedSettings => NewSettings;
|
|
|
|
/// <summary>
|
|
/// 获取设置类型
|
|
/// </summary>
|
|
public Type SettingsType => typeof(T);
|
|
|
|
/// <summary>
|
|
/// 获取设置实例
|
|
/// </summary>
|
|
public ISettingsSection Settings => NewSettings;
|
|
|
|
/// <summary>
|
|
/// 获取重置时间
|
|
/// </summary>
|
|
public DateTime ChangedAt { get; } = DateTime.UtcNow;
|
|
} |