GeWuYou 31045f305c refactor(core): 调整命名空间结构以优化模块组织
- 将 IRegistry 接口从 GFramework.Game.Abstractions.registry 移至 GFramework.Core.Abstractions.registries
- 移除 KeyValueRegistryBase 中对旧命名空间的引用
- 将 IsExternalInit 类从 System.Runtime.CompilerServices 移至 GFramework.Game.Abstractions.internals
- 更新 IGameSceneRegistry 对新注册表命名空间的引用
- 将音频和图形设置类移至 GFramework.Game.Abstractions.setting.data 子命名空间
- 将资产注册表接口更新为使用新的核心注册表命名空间
- 调整 Godot 模块中的音频总线映射命名空间至 data 子目录
- 更新 Godot 音频和图形设置类以引用正确的设置数据命名空间
2026-01-27 22:58:37 +08:00

37 lines
1017 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.

using GFramework.Core.Abstractions.versioning;
namespace GFramework.Game.Abstractions.setting.data;
/// <summary>
/// 音频设置类,用于管理游戏中的音频配置
/// </summary>
public class AudioSettings : ISettingsData, IVersioned
{
/// <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;
/// <summary>
/// 重置音频设置为默认值
/// </summary>
public void Reset()
{
// 重置所有音量设置为默认值
MasterVolume = 1.0f;
BgmVolume = 0.8f;
SfxVolume = 0.8f;
}
public int Version { get; set; } = 1;
}