BTSDS: Piano!!!

This commit is contained in:
Jenny Crowe
2022-03-07 02:16:31 -07:00
parent 5711a1508b
commit 2ac602dbe6
5 changed files with 81 additions and 21 deletions

View File

@ -224,7 +224,7 @@ namespace RhythmHeavenMania
SetCurrentEventToClosest(beat);
}
for (int i = 0; i < SoundObjects.Count; i++) Destroy(SoundObjects[i].gameObject);
KillAllSounds();
}
public void Pause()
@ -237,6 +237,13 @@ namespace RhythmHeavenMania
Conductor.instance.Stop(beat);
SetCurrentEventToClosest(beat);
onBeatChanged?.Invoke(beat);
KillAllSounds();
}
public void KillAllSounds()
{
for (int i = 0; i < SoundObjects.Count; i++)
Destroy(SoundObjects[i].gameObject);
}
#endregion