Skip to content

Commit

Permalink
Reset sounds on level switch.
Browse files Browse the repository at this point in the history
  • Loading branch information
isadorasophia committed Oct 14, 2024
1 parent 6295bf9 commit 7372acb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Murder/Services/LevelServices.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Bang;
using Bang.StateMachines;
using Murder.Core.Sounds;

namespace Murder.Services
{
Expand All @@ -24,6 +25,9 @@ public static IEnumerator<Wait> SwitchSceneOnSecondsCoroutine(Guid nextWorldGuid
{
yield return Wait.ForSeconds(seconds);

SoundServices.Stop(SoundLayer.Ambience, fadeOut: true);
SoundServices.Stop(SoundLayer.Sfx, fadeOut: true);

SwitchScene(nextWorldGuid);
}
}
Expand Down

0 comments on commit 7372acb

Please sign in to comment.