aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/devmenu/DiffEditor.java2
-rw-r--r--src/gameplay/SongPlayer.java2
-rw-r--r--src/main/Difficulty.java4
3 files changed, 4 insertions, 4 deletions
diff --git a/src/devmenu/DiffEditor.java b/src/devmenu/DiffEditor.java
index 6bcbd28..d53505d 100644
--- a/src/devmenu/DiffEditor.java
+++ b/src/devmenu/DiffEditor.java
@@ -40,7 +40,7 @@ public class DiffEditor
Button save = new Button("Save");
save.setOnAction(e -> { //assigns text feilds to values
diff.title = title.getText();
- diff.bpm = Integer.parseInt(bpm.getText());
+ diff.bpm = Double.parseDouble(bpm.getText());
diff.numBeats = Integer.parseInt(numBeats.getText());
diff.writeMetadata();
});
diff --git a/src/gameplay/SongPlayer.java b/src/gameplay/SongPlayer.java
index 8745727..78d3a9f 100644
--- a/src/gameplay/SongPlayer.java
+++ b/src/gameplay/SongPlayer.java
@@ -41,7 +41,7 @@ import sound.AudioFilePlayer;
public class SongPlayer extends Pane {
- private int bpm; //initializes the bpm of the song, to be read in from a metadata file later
+ private Double bpm; //initializes the bpm of the song, to be read in from a metadata file later
private int songLength; //initializes the length of the song in terms of the song's bpm, to be read in later
AudioFilePlayer music;
diff --git a/src/main/Difficulty.java b/src/main/Difficulty.java
index c7a289a..0691675 100644
--- a/src/main/Difficulty.java
+++ b/src/main/Difficulty.java
@@ -17,7 +17,7 @@ public class Difficulty
public String title = "Unnamed";
private ObservableList<LeaderboardEntry> leaderboard = FXCollections.observableArrayList();
public File notes;
- public int bpm;
+ public Double bpm;
public int numBeats;
public Level level;
@@ -67,7 +67,7 @@ public class Difficulty
JSONObject diffStuff = (JSONObject)(obj); //converts read object to a JSONObject
title = (String) diffStuff.get("title");
- bpm = Integer.parseInt(diffStuff.get("bpm")+"");
+ bpm = Double.parseDouble(diffStuff.get("bpm")+"");
numBeats = Integer.parseInt(diffStuff.get("numBeats")+"");
}
catch (Exception e)