diff options
author | sowgro <tpoke.ferrari@gmail.com> | 2024-07-08 02:41:31 -0400 |
---|---|---|
committer | sowgro <tpoke.ferrari@gmail.com> | 2024-07-08 02:41:31 -0400 |
commit | ee2229339429d50afa33e2f8b9c0ee0939766290 (patch) | |
tree | a5ee54bd23c24950e9b10815f3e87605906992d8 /src/gameplay | |
parent | 9e1371424bdf4c31d756d686313730d4c61f7ac5 (diff) | |
download | NPEhero-ee2229339429d50afa33e2f8b9c0ee0939766290.tar.gz NPEhero-ee2229339429d50afa33e2f8b9c0ee0939766290.tar.bz2 NPEhero-ee2229339429d50afa33e2f8b9c0ee0939766290.zip |
Change project structure, embed resources into jar and remove libraries from source control
Diffstat (limited to '')
-rwxr-xr-x[-rw-r--r--] | src/main/java/net/sowgro/npehero/gameplay/Block.java (renamed from src/gameplay/Block.java) | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | src/main/java/net/sowgro/npehero/gameplay/NoteInfo.java (renamed from src/gameplay/NoteInfo.java) | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | src/main/java/net/sowgro/npehero/gameplay/SongPlayer.java (renamed from src/gameplay/SongPlayer.java) | 25 | ||||
-rwxr-xr-x[-rw-r--r--] | src/main/java/net/sowgro/npehero/gameplay/Target.java (renamed from src/gameplay/Target.java) | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | src/main/java/net/sowgro/npehero/gameplay/Timer.java (renamed from src/gameplay/Timer.java) | 2 |
5 files changed, 16 insertions, 17 deletions
diff --git a/src/gameplay/Block.java b/src/main/java/net/sowgro/npehero/gameplay/Block.java index 68e52b6..5bc9d9c 100644..100755 --- a/src/gameplay/Block.java +++ b/src/main/java/net/sowgro/npehero/gameplay/Block.java @@ -1,6 +1,6 @@ //glowing block of color c (jfx node) -package gameplay; +package net.sowgro.npehero.gameplay; import javafx.scene.effect.BlurType; import javafx.scene.effect.DropShadow; diff --git a/src/gameplay/NoteInfo.java b/src/main/java/net/sowgro/npehero/gameplay/NoteInfo.java index 6428066..a34e939 100644..100755 --- a/src/gameplay/NoteInfo.java +++ b/src/main/java/net/sowgro/npehero/gameplay/NoteInfo.java @@ -1,7 +1,7 @@ /*Name: Guitar Hero Project *Description: Contains the info for when to send a note */ -package gameplay; +package net.sowgro.npehero.gameplay; import javafx.scene.paint.Color; diff --git a/src/gameplay/SongPlayer.java b/src/main/java/net/sowgro/npehero/gameplay/SongPlayer.java index 8df2c1f..39932a5 100644..100755 --- a/src/gameplay/SongPlayer.java +++ b/src/main/java/net/sowgro/npehero/gameplay/SongPlayer.java @@ -1,4 +1,4 @@ -package gameplay; +package net.sowgro.npehero.gameplay; import java.io.File; import java.io.FileNotFoundException; @@ -11,8 +11,8 @@ import java.util.Scanner; import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.UnsupportedAudioFileException; -import gui.Driver; -import gui.GameOver; +import net.sowgro.npehero.Driver; +import net.sowgro.npehero.gui.GameOver; import javafx.geometry.Pos; import javafx.scene.CacheHint; import javafx.scene.input.KeyCode; @@ -23,8 +23,9 @@ import javafx.scene.layout.VBox; import javafx.scene.paint.Color; import javafx.animation.*; import javafx.util.*; -import main.Difficulty; -import main.ScoreController; +import net.sowgro.npehero.main.Difficulty; +import net.sowgro.npehero.main.Level; +import net.sowgro.npehero.main.ScoreController; @@ -49,14 +50,14 @@ public class SongPlayer extends Pane { private boolean songIsPlaying = false; private boolean missMute = false; - private main.Level level; + private Level level; private Difficulty difficulty; private Pane pane; Timer timer; //the timer that determines when notes will fall, counted in terms of the song's bpm final int TIME = 1000; //delay for notes falling down the screen - main.ScoreController scoreCounter = new ScoreController(); //used to keep track of the user's score + ScoreController scoreCounter = new ScoreController(); //used to keep track of the user's score HBox buttonBox = new HBox(); //used to align the buttons horizontally VBox place = new VBox(); //used to place the buttons within the frame @@ -111,7 +112,7 @@ public class SongPlayer extends Pane { } } - public SongPlayer(main.Level lvl, Difficulty d, Pane p, ScoreController cntrl) { + public SongPlayer(Level lvl, Difficulty d, Pane p, ScoreController cntrl) { Driver.soundController.endSong(); song = lvl.song; @@ -146,7 +147,7 @@ public class SongPlayer extends Pane { genButton(jButton); genButton(kButton); - gui.Driver.primaryStage.getScene().setOnKeyPressed(e -> { + Driver.primaryStage.getScene().setOnKeyPressed(e -> { /** * The keyboard detection for the game: when a key is pressed it * calls the checkNote() method for the corresponding lane @@ -199,8 +200,6 @@ public class SongPlayer extends Pane { * * @param sends the queue to check * @param lane the lane to send the note to - * @param pos the x pos of the note to be sent - * @param c the color of the sent note */ public void sendNote(Queue<NoteInfo> sends, ArrayList<Block> lane, Target button) { if (sends.peek() != null && timer.time() > sends.peek().getTime()-(1000*(bpm/60000.0))) { @@ -263,7 +262,7 @@ public class SongPlayer extends Pane { sendNote(jSends, jLane, jButton); sendNote(kSends, kLane, kButton); if (timer.time() > songLength) { - gui.Driver.setMenu(new GameOver(level, difficulty, pane, scoreCounter.getScore())); + Driver.setMenu(new GameOver(level, difficulty, pane, scoreCounter.getScore())); cancel(); } if (!songIsPlaying && timer.time() > 0.0) { @@ -289,7 +288,7 @@ public class SongPlayer extends Pane { missMute = true; Driver.soundController.endSong(); Driver.soundController.playMenuSong(); - gui.Driver.setMenuBackground(); + Driver.setMenuBackground(); gameLoop.stop(); } diff --git a/src/gameplay/Target.java b/src/main/java/net/sowgro/npehero/gameplay/Target.java index 6bfac18..3dc8564 100644..100755 --- a/src/gameplay/Target.java +++ b/src/main/java/net/sowgro/npehero/gameplay/Target.java @@ -1,6 +1,6 @@ //glowing block of color c (jfx node) -package gameplay; +package net.sowgro.npehero.gameplay; import javafx.scene.layout.StackPane; import javafx.scene.paint.Color; diff --git a/src/gameplay/Timer.java b/src/main/java/net/sowgro/npehero/gameplay/Timer.java index 96a6c30..eada237 100644..100755 --- a/src/gameplay/Timer.java +++ b/src/main/java/net/sowgro/npehero/gameplay/Timer.java @@ -2,7 +2,7 @@ *Description: Contains the method used to determine how long the user has been playing, * used to determine when to send notes */ -package gameplay; +package net.sowgro.npehero.gameplay; public class Timer |