【m】04.AudioCore [1.1.3] - 2026-01-12
### Added - 添加背景音乐缓出接口 ### Fixed - 修复背景音乐播放时不循环的问题
This commit is contained in:
@@ -168,8 +168,7 @@ namespace Stary.Evo.AudioCore
|
||||
/// <summary>
|
||||
/// 停止播放背景音乐
|
||||
/// </summary>
|
||||
/// <param name="fadeDuration">自然过渡时间</param>
|
||||
public static void StopMusic(float fadeDuration = 1f)
|
||||
public static void StopMusic()
|
||||
{
|
||||
if (Music == null)
|
||||
{
|
||||
@@ -180,6 +179,21 @@ namespace Stary.Evo.AudioCore
|
||||
Music.Stop();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 停止播放背景音乐
|
||||
/// </summary>
|
||||
/// <param name="fadeDuration">自然过渡时间</param>
|
||||
public static void FadeAllMusic(float fadeDuration = 1)
|
||||
{
|
||||
if (Music == null)
|
||||
{
|
||||
Debug.LogError("AudioCoreManager: Music is null, please initialize it first.");
|
||||
return;
|
||||
}
|
||||
|
||||
Music.FadeAllMusic(fadeDuration);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user