diff options
| author | sowgro <tpoke.ferrari@gmail.com> | 2023-06-02 01:36:34 -0400 | 
|---|---|---|
| committer | sowgro <tpoke.ferrari@gmail.com> | 2023-06-02 01:36:34 -0400 | 
| commit | 571bab88c599571ee5bd9c6f5f8af2f3016fb19d (patch) | |
| tree | c8e96fa99ce1dddaae68fb60c27ddcf990c87a0a /src | |
| parent | 0b7f45fcb05814870733613dcff233451948c967 (diff) | |
| download | NPEhero-571bab88c599571ee5bd9c6f5f8af2f3016fb19d.tar.gz NPEhero-571bab88c599571ee5bd9c6f5f8af2f3016fb19d.tar.bz2 NPEhero-571bab88c599571ee5bd9c6f5f8af2f3016fb19d.zip  | |
bpm is now a double
Diffstat (limited to '')
| -rw-r--r-- | src/devmenu/DiffEditor.java | 2 | ||||
| -rw-r--r-- | src/gameplay/SongPlayer.java | 2 | ||||
| -rw-r--r-- | src/main/Difficulty.java | 4 | 
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)  | 
