aboutsummaryrefslogtreecommitdiff
path: root/src/main/ScoreController.java
diff options
context:
space:
mode:
authorsowgro <tpoke.ferrari@gmail.com>2023-06-05 00:34:16 -0400
committersowgro <tpoke.ferrari@gmail.com>2023-06-05 00:34:16 -0400
commita14862a6bc0dbb1ae78cd4e2e4795d4194772583 (patch)
tree88db04cdcc76454ae0f0025a9249270fab45ee22 /src/main/ScoreController.java
parentd87a87aabde8b4011910dfed731362b7cf0b6b24 (diff)
downloadNPEhero-a14862a6bc0dbb1ae78cd4e2e4795d4194772583.tar.gz
NPEhero-a14862a6bc0dbb1ae78cd4e2e4795d4194772583.tar.bz2
NPEhero-a14862a6bc0dbb1ae78cd4e2e4795d4194772583.zip
rewrote everything related to sound
Diffstat (limited to 'src/main/ScoreController.java')
-rw-r--r--src/main/ScoreController.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/main/ScoreController.java b/src/main/ScoreController.java
index d2606a4..54dd960 100644
--- a/src/main/ScoreController.java
+++ b/src/main/ScoreController.java
@@ -1,8 +1,8 @@
package main;
+import gui.Driver;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
-import sound.ShortAudioPlayer;
public class ScoreController{
@@ -12,8 +12,6 @@ public class ScoreController{
public StringProperty scoreProperty = new SimpleStringProperty("0");
public StringProperty comboProperty = new SimpleStringProperty("0");
- sound.ShortAudioPlayer fx = new ShortAudioPlayer();
-
/**
* Called when the user performs a perfect hit
*/
@@ -40,7 +38,7 @@ public class ScoreController{
* Called when the user misses a note
*/
public void miss() {
- fx.play("src/assets/Miss.wav");
+ Driver.soundController.playSfx("miss");
combo = 0;
comboMultiplier = 1;
scoreProperty.setValue(score+"");
@@ -52,7 +50,7 @@ public class ScoreController{
* Increments the combo by one
*/
private void combo() {
- fx.play("src/assets/Hitsound.wav");
+ Driver.soundController.playSfx("hit");
combo++;
if (combo == 2) {