aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorAidan Ross <aross02@fairport.org>2023-05-30 08:13:47 -0400
committerAidan Ross <aross02@fairport.org>2023-05-30 08:13:47 -0400
commit0072477c3b18edefae34e0b634436aeecb625b10 (patch)
treede5c87d1d17cba40e1a1207de53be6c2a09f1273 /src/main
parenteb1b728e3d8e7fd6a1b535ecc97928b23f81b00d (diff)
downloadNPEhero-0072477c3b18edefae34e0b634436aeecb625b10.tar.gz
NPEhero-0072477c3b18edefae34e0b634436aeecb625b10.tar.bz2
NPEhero-0072477c3b18edefae34e0b634436aeecb625b10.zip
Early syncing tests with placeholder hit sounds and miss sounds
Diffstat (limited to 'src/main')
-rw-r--r--src/main/ScoreController.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/ScoreController.java b/src/main/ScoreController.java
index 52907ad..d2606a4 100644
--- a/src/main/ScoreController.java
+++ b/src/main/ScoreController.java
@@ -2,6 +2,7 @@ package main;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
+import sound.ShortAudioPlayer;
public class ScoreController{
@@ -11,6 +12,8 @@ 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
*/
@@ -37,6 +40,7 @@ public class ScoreController{
* Called when the user misses a note
*/
public void miss() {
+ fx.play("src/assets/Miss.wav");
combo = 0;
comboMultiplier = 1;
scoreProperty.setValue(score+"");
@@ -48,6 +52,7 @@ public class ScoreController{
* Increments the combo by one
*/
private void combo() {
+ fx.play("src/assets/Hitsound.wav");
combo++;
if (combo == 2) {