From 2d42d77c883453e4f03ca0a47068f9d1f6c61aa6 Mon Sep 17 00:00:00 2001
From: sowgro <tpoke.ferrari@gmail.com>
Date: Sun, 14 Jul 2024 22:43:01 -0400
Subject: Refactoring and SoundController improvements

---
 src/main/java/net/sowgro/npehero/gui/GameOver.java | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

(limited to 'src/main/java/net/sowgro/npehero/gui/GameOver.java')

diff --git a/src/main/java/net/sowgro/npehero/gui/GameOver.java b/src/main/java/net/sowgro/npehero/gui/GameOver.java
index 99f3985..b75ec43 100755
--- a/src/main/java/net/sowgro/npehero/gui/GameOver.java
+++ b/src/main/java/net/sowgro/npehero/gui/GameOver.java
@@ -14,6 +14,7 @@ import javafx.scene.text.Text;
 import net.sowgro.npehero.Driver;
 import net.sowgro.npehero.main.Difficulty;
 import net.sowgro.npehero.main.Level;
+import net.sowgro.npehero.main.SoundController;
 
 public class GameOver extends Pane
 {
@@ -71,7 +72,7 @@ public class GameOver extends Pane
         save.setOnAction(new EventHandler<ActionEvent>() { //this is the same as the "e ->" thing but it allows more than one line to be added 
             @Override
             public void handle(ActionEvent event) {
-                Driver.soundController.playSfx("forward");
+                SoundController.playSfx(SoundController.FORWARD);
                 save.setDisable(true);
                 name.setDisable(true);
                 diff.addToLeaderboard(name.getText(), score2);
@@ -92,14 +93,14 @@ public class GameOver extends Pane
         Button exit = new Button();
         exit.setText("Back");
         exit.setOnAction(e -> {
-            Driver.soundController.playSfx("backward");
+            SoundController.playSfx(SoundController.BACKWARD);
             Driver.setMenu(lastMenu);
         });
 
         Button replay = new Button();
         replay.setText("Replay");
         replay.setOnAction(e -> {
-            Driver.soundController.playSfx("forward");
+            SoundController.playSfx(SoundController.FORWARD);
             Driver.setMenu(new LevelSurround(level, diff, lastMenu));
         });
 
-- 
cgit v1.2.3