namespace BaseGames.Core { /// /// 音频服务接口。 /// 实现由 BaseGames.Audio 程序集提供;Core 层注册 NullAudioService 作为兜底。 /// public interface IAudioService { /// 播放背景音乐(循环)。key 对应 Addressables 地址或 Audio Mixer 键。 void PlayBGM(string key); /// 停止背景音乐。fadeTime > 0 则淡出。 void StopBGM(float fadeTime = 0f); /// 单次播放音效。 void PlaySFX(string key); /// 设置混音器音量(0–1)。group 取 AudioMixerKeys 常量。 void SetVolume(string group, float normalizedVolume); } }