GeWuYou 442e8e7088 refactor(setting): 重构设置系统以支持数据和应用器分离
- 将SettingsModel内部存储分离为_dataSettings和_applicators两个字典
- 添加IDataSettings接口用于标识纯数据设置
- 修改Get方法为GetData以明确区分数据获取
- 添加RegisterApplicator和GetApplicator方法管理可应用设置
- 更新TryGet方法支持从数据和应用器中查找设置
- 扩展SettingsPersistence支持批量保存和加载所有设置数据
- 将AudioBusMap重命名为AudioBusMapSettings并实现ISettingsData接口
- 修改Godot音频和图形设置适配新的接口变更
- [skip ci]
2026-01-16 23:44:28 +08:00

22 lines
650 B
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.

namespace GFramework.Game.Abstractions.setting;
/// <summary>
/// 音频设置类,用于管理游戏中的音频配置
/// </summary>
public class AudioSettings : ISettingsData
{
/// <summary>
/// 获取或设置主音量,控制所有音频的总体音量
/// </summary>
public float MasterVolume { get; set; } = 1.0f;
/// <summary>
/// 获取或设置背景音乐音量控制BGM的播放音量
/// </summary>
public float BgmVolume { get; set; } = 0.8f;
/// <summary>
/// 获取或设置音效音量控制SFX的播放音量
/// </summary>
public float SfxVolume { get; set; } = 0.8f;
}