【m】音乐变化修改

This commit is contained in:
Han
2025-06-23 18:03:56 +08:00
parent 607b918c13
commit a160595baf
2 changed files with 3 additions and 3 deletions

View File

@@ -89,11 +89,11 @@ namespace Stary.Evo.AudioCore
{
if (currentAudioSource.volume > targetVolume)
{
currentAudioSource.volume -= startVolume * Time.deltaTime / fadeDuration;
currentAudioSource.volume -= (startVolume-targetVolume) * Time.deltaTime / fadeDuration;
}
else
{
currentAudioSource.volume += startVolume * Time.deltaTime / fadeDuration;
currentAudioSource.volume += (targetVolume-startVolume) * Time.deltaTime / fadeDuration;
}
if (Mathf.Abs(currentAudioSource.volume - targetVolume) < 0.01f)