From 92f0e69cc938a058805e41780cb8a1bc7e6abda1 Mon Sep 17 00:00:00 2001 From: Aidan Ross Date: Sun, 28 May 2023 21:05:30 -0400 Subject: Removed unnecesary files in the gameplay class, as well as merged gameplay.score with main.scoreController such that score and combo are now displayed properly on the screen --- src/gameplay/SongPlayer.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/gameplay/SongPlayer.java') diff --git a/src/gameplay/SongPlayer.java b/src/gameplay/SongPlayer.java index 10caf46..91221de 100644 --- a/src/gameplay/SongPlayer.java +++ b/src/gameplay/SongPlayer.java @@ -41,8 +41,7 @@ public class SongPlayer extends Pane { Timer timer; final int TIME = 1500; // delay for notes falling down the screen - Score scoreCounter = new Score(); - StringProperty scoreString = new SimpleStringProperty(); + main.ScoreController scoreCounter = new ScoreController(); Rectangle goalPerfect = new Rectangle(); HBox buttonBox = new HBox(); @@ -103,7 +102,7 @@ public class SongPlayer extends Pane { public SongPlayer(main.Level lvl, Difficulty d, Pane p, ScoreController cntrl) { bpm = d.bpm; timer = new Timer(60); - + scoreCounter = cntrl; try { loadSong(d.notes); @@ -283,14 +282,12 @@ public class SongPlayer extends Pane { if (distance < super.getHeight() / 16) { ft.setFromValue(Color.WHITE); ft.play(); - scoreCounter.combo(); scoreCounter.perfect(); return 2; } if (distance < super.getHeight() / 5) { ft.setFromValue(Color.CYAN); ft.play(); - scoreCounter.combo(); scoreCounter.good(); return 1; } @@ -301,4 +298,5 @@ public class SongPlayer extends Pane { } return -1; } + } \ No newline at end of file -- cgit v1.2.3