Skip to content

Commit f376e76

Browse files
committed
Remove all sound sources upon collecting mini heart
1 parent d9e601b commit f376e76

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Entities/MiniHeart.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using System.Collections;
77
using System.Collections.Generic;
88
using System.Collections.ObjectModel;
9+
using System.Linq;
910

1011
namespace Celeste.Mod.CollabUtils2.Entities {
1112
[CustomEntity("CollabUtils2/MiniHeart")]
@@ -30,6 +31,11 @@ private IEnumerator SmashRoutine(Player player, Level level) {
3031
Audio.SetMusic(null);
3132
Audio.SetAmbience(null);
3233

34+
// kill all sound sources
35+
foreach (SoundSource s in Scene.Tracker.GetComponents<SoundSource>().ToList()) {
36+
s.RemoveSelf();
37+
}
38+
3339
// collect all berries
3440
List<IStrawberry> list = new List<IStrawberry>();
3541
ReadOnlyCollection<Type> berryTypes = StrawberryRegistry.GetBerryTypes();

everest.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
- Name: CollabUtils2
2-
Version: 1.5.12
2+
Version: 1.5.13
33
DLL: bin/Debug/net452/CollabUtils2.dll
44
Dependencies:
55
- Name: Everest

0 commit comments

Comments
 (0)