From 774836dbd052f649367d7374bd1f9a9094646bb1 Mon Sep 17 00:00:00 2001 From: RandomityGuy <31925790+RandomityGuy@users.noreply.github.com> Date: Mon, 19 Dec 2022 19:16:04 +0530 Subject: [PATCH] stop time travel and alarm sounds --- src/MarbleWorld.hx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/MarbleWorld.hx b/src/MarbleWorld.hx index 5c67f470..d61bbf32 100644 --- a/src/MarbleWorld.hx +++ b/src/MarbleWorld.hx @@ -1185,6 +1185,15 @@ class MarbleWorld extends Scheduler { this.finishPitch = this.marble.camera.CameraPitch; displayAlert("Congratulations! You've finished!"); this.schedule(this.timeState.currentAttemptTime + 2, () -> cast showFinishScreen()); + // Stop the ongoing sounds + if (timeTravelSound != null) { + timeTravelSound.stop(); + timeTravelSound = null; + } + if (alarmSound != null) { + alarmSound.stop(); + alarmSound = null; + } } }