stop time travel and alarm sounds

This commit is contained in:
RandomityGuy 2022-12-19 19:16:04 +05:30
parent ef546d375a
commit 774836dbd0

View file

@ -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;
}
}
}