diff options
| author | Aidan Ross <aross02@fairport.org> | 2023-06-07 09:21:47 -0400 | 
|---|---|---|
| committer | Aidan Ross <aross02@fairport.org> | 2023-06-07 09:21:47 -0400 | 
| commit | 6e9e025c72c88e113f8ba4dac1c21ffe56ba23ef (patch) | |
| tree | f8784ab8e5c3dc516a6b763f956099154d9d33af | |
| parent | cf071592066aed782c2c0ea962dec5eb8cd6ed2b (diff) | |
| download | NPEhero-6e9e025c72c88e113f8ba4dac1c21ffe56ba23ef.tar.gz NPEhero-6e9e025c72c88e113f8ba4dac1c21ffe56ba23ef.tar.bz2 NPEhero-6e9e025c72c88e113f8ba4dac1c21ffe56ba23ef.zip | |
Somehow, the linear interpolator on the note animation got lost at some point so I put that back in.
Also, I fixed a centering issue in the distanceToGoal() method that caused some perfect hits to register as good.
| -rw-r--r-- | levels/Easy Level for Little Babies/Baby/leaderboard.json | 2 | ||||
| -rw-r--r-- | levels/Take On Me/Medium/leaderboard.json | 2 | ||||
| -rw-r--r-- | settings.json | 2 | ||||
| -rw-r--r-- | src/gameplay/SongPlayer.java | 9 | 
4 files changed, 8 insertions, 7 deletions
| diff --git a/levels/Easy Level for Little Babies/Baby/leaderboard.json b/levels/Easy Level for Little Babies/Baby/leaderboard.json index 3a52321..1671881 100644 --- a/levels/Easy Level for Little Babies/Baby/leaderboard.json +++ b/levels/Easy Level for Little Babies/Baby/leaderboard.json @@ -1 +1 @@ -[{"date":"2023-06-06","score":113400,"name":"I MESSED UP ONE NOTE"}]
\ No newline at end of file +[{"date":"2023-06-06","score":113400,"name":"I MESSED UP ONE NOTE"},{"date":"2023-06-07","score":60600,"name":"connor"}]
\ No newline at end of file diff --git a/levels/Take On Me/Medium/leaderboard.json b/levels/Take On Me/Medium/leaderboard.json index 1f405c9..32e170f 100644 --- a/levels/Take On Me/Medium/leaderboard.json +++ b/levels/Take On Me/Medium/leaderboard.json @@ -1 +1 @@ -[{"date":"2023-06-06","score":2059000,"name":"A Train"}]
\ No newline at end of file +[{"date":"2023-06-06","score":2059000,"name":"A Train"},{"date":"2023-06-07","score":2151900,"name":"Aidan"}]
\ No newline at end of file diff --git a/settings.json b/settings.json index b7be92b..7b720ef 100644 --- a/settings.json +++ b/settings.json @@ -1 +1 @@ -{"musicVol":1.0,"effectsVol":1.0}
\ No newline at end of file +{"musicVol":1.0,"effectsVol":0.2374999863760811}
\ No newline at end of file diff --git a/src/gameplay/SongPlayer.java b/src/gameplay/SongPlayer.java index 6145f14..c03be58 100644 --- a/src/gameplay/SongPlayer.java +++ b/src/gameplay/SongPlayer.java @@ -204,7 +204,7 @@ public class SongPlayer extends Pane {  	 */  	public void sendNote(Queue<NoteInfo> sends, ArrayList<Block> lane, Target button) {  		if (sends.peek() != null && timer.time() > sends.peek().getTime()-(1000*(bpm/60000.0))) { -			TranslateTransition anim = new TranslateTransition(Duration.millis(TIME+60)); +			TranslateTransition anim = new TranslateTransition(Duration.millis(TIME+105));  			lane.add(new Block(button.getColor(), 50, 50, 5));  			int index = lane.size() - 1; @@ -217,7 +217,8 @@ public class SongPlayer extends Pane {  			lane.get(index).arcWidthProperty().bind(super.widthProperty().divide(25));  			lane.get(index).setX(button.getLayoutX());  			lane.get(index).setY(-lane.get(index).getHeight()); -			anim.setByY(super.getHeight() + lane.get(index).getHeight()); +			anim.setInterpolator(Interpolator.LINEAR); +			anim.setByY(super.getHeight() + lane.get(index).getHeight() + 75);  			anim.setCycleCount(1);  			anim.setAutoReverse(false);  			anim.setNode(lane.get(lane.size() - 1)); @@ -317,7 +318,7 @@ public class SongPlayer extends Pane {  	 * @return  	 */  	private double distanceToGoal(Block note) { -		return Math.abs((super.getHeight() - note.getTranslateY()) - dButton.rect.getY()); +		return Math.abs((super.getHeight() - note.getTranslateY() + note.getHeight()/2) - dButton.rect.getLayoutY());  	}  	/** @@ -343,7 +344,7 @@ public class SongPlayer extends Pane {  					scoreCounter.perfect();  					return 2;  				} -				if (distance < super.getHeight() / 5) { +				if (distance < super.getHeight() / 4) {  					ft.setFromValue(Color.CYAN);  					ft.play();  					scoreCounter.good(); | 
