Fix move sfx not stop
This commit is contained in:
@@ -219,5 +219,10 @@ namespace BrewMonster.Scripts
|
||||
_moveSoundSource.Play();
|
||||
}
|
||||
}
|
||||
public async UniTaskVoid StopMoveSoundAsync()
|
||||
{
|
||||
if (_moveSoundSource == null) return;
|
||||
_moveSoundSource.Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user