GwWuYou 807dbc482e feat(setting): 添加设置管理系统和Godot平台实现
- 实现了SettingsModel用于管理应用程序设置部分
- 创建了SettingsSystem用于应用各种设置配置
- 添加了AudioSettings和GraphicsSettings基础设置类
- 定义了ISettingsModel、ISettingsSystem等核心接口
- 实现了GodotAudioApplier用于应用音频设置到Godot音频系统
- 创建了GodotGraphicsSettings用于管理游戏图形显示设置
- 添加了GodotFileStorage特化文件存储实现
- 实现了Godot路径扩展方法IsUserPath、IsResPath、IsGodotPath
- 添加了AudioBusMap音频总线映射配置类
2026-01-12 21:07:27 +08:00

38 lines
1.4 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Collections.Generic;
using GFramework.Core.Abstractions.model;
namespace GFramework.Game.Abstractions.setting;
/// <summary>
/// 定义设置模型的接口,提供获取特定类型设置节的功能
/// </summary>
public interface ISettingsModel : IModel
{
/// <summary>
/// 获取指定类型的设置节实例
/// </summary>
/// <typeparam name="T">设置节的类型必须是class、实现ISettingsSection接口且具有无参构造函数</typeparam>
/// <returns>指定类型的设置节实例</returns>
T Get<T>() where T : class, ISettingsSection, new();
/// <summary>
/// 尝试获取指定类型的设置节实例
/// </summary>
/// <param name="type">要获取的设置节类型</param>
/// <param name="section">输出参数如果成功则包含找到的设置节实例否则为null</param>
/// <returns>如果找到指定类型的设置节则返回true否则返回false</returns>
bool TryGet(Type type, out ISettingsSection section);
/// <summary>
/// 获取所有设置节的集合
/// </summary>
/// <returns>包含所有设置节的可枚举集合</returns>
IEnumerable<ISettingsSection> All();
/// <summary>
/// 注册一个可应用的设置对象
/// </summary>
/// <param name="applyAble">要注册的可应用设置对象</param>
void Register(IApplyAbleSettings applyAble);
}