From 33a85c97a1afb20da44edff7bb7b86fe1cc373f9 Mon Sep 17 00:00:00 2001 From: RandomityGuy <31925790+RandomityGuy@users.noreply.github.com> Date: Tue, 11 Jun 2024 18:10:22 +0530 Subject: [PATCH] fix pause sound bug --- src/MarbleGame.hx | 1 + src/gui/ExitGameDlg.hx | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/MarbleGame.hx b/src/MarbleGame.hx index ed6217b8..f3fe72b7 100644 --- a/src/MarbleGame.hx +++ b/src/MarbleGame.hx @@ -284,6 +284,7 @@ class MarbleGame { Console.log("Game paused"); world.setCursorLock(false); @:privateAccess world.playGui.setGuiVisibility(false); + AudioManager.playSound(ResourceLoader.getAudio('data/sound/level_text.wav').resource); showPauseUI(); } else { if (world._ready) { diff --git a/src/gui/ExitGameDlg.hx b/src/gui/ExitGameDlg.hx index f466efaa..eb2326f5 100644 --- a/src/gui/ExitGameDlg.hx +++ b/src/gui/ExitGameDlg.hx @@ -19,8 +19,6 @@ class ExitGameDlg extends GuiImage { var res = ResourceLoader.getImage("data/ui/xbox/BG_fadeOutSoftEdge.png").resource.toTile(); super(res); - AudioManager.playSound(ResourceLoader.getResource('data/sound/level_text.wav', ResourceLoader.getAudio, this.soundResources)); - this.horizSizing = Width; this.vertSizing = Height; this.position = new Vector();