From d43f50e8266bdcfee98035228ab7f3ef4f2070c4 Mon Sep 17 00:00:00 2001 From: Tran Hai Nam Date: Fri, 24 Apr 2026 17:49:20 +0700 Subject: [PATCH] Fix move sfx not stop --- Assets/PerfectWorld/Scripts/Sound/SFXManager.cs | 5 +++++ Assets/Scripts/CECHostPlayer.cs | 11 +++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Assets/PerfectWorld/Scripts/Sound/SFXManager.cs b/Assets/PerfectWorld/Scripts/Sound/SFXManager.cs index f98c969b14..1599880e6c 100644 --- a/Assets/PerfectWorld/Scripts/Sound/SFXManager.cs +++ b/Assets/PerfectWorld/Scripts/Sound/SFXManager.cs @@ -219,5 +219,10 @@ namespace BrewMonster.Scripts _moveSoundSource.Play(); } } + public async UniTaskVoid StopMoveSoundAsync() + { + if (_moveSoundSource == null) return; + _moveSoundSource.Stop(); + } } } diff --git a/Assets/Scripts/CECHostPlayer.cs b/Assets/Scripts/CECHostPlayer.cs index 00d1f5cd6d..9745b693a7 100644 --- a/Assets/Scripts/CECHostPlayer.cs +++ b/Assets/Scripts/CECHostPlayer.cs @@ -4213,7 +4213,7 @@ namespace BrewMonster } else { - newId = 164; + newId = 0; } PlayMoveSound(newId); @@ -4227,7 +4227,14 @@ namespace BrewMonster { if (id == _curMoveSndId) return; _curMoveSndId = id; - SFXManager.Instance?.PlayMoveSoundAsync(id).Forget(); + if(id > 0) + { + SFXManager.Instance?.PlayMoveSoundAsync(id).Forget(); + } + else + { + SFXManager.Instance?.StopMoveSoundAsync().Forget(); + } } ///