aboutsummaryrefslogtreecommitdiff
path: root/src/fallTest/NoteField.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/fallTest/NoteField.java')
-rw-r--r--src/fallTest/NoteField.java34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/fallTest/NoteField.java b/src/fallTest/NoteField.java
new file mode 100644
index 0000000..a24fea0
--- /dev/null
+++ b/src/fallTest/NoteField.java
@@ -0,0 +1,34 @@
+/*Name: Guitar Hero Project
+ *Description: Contains the information for a single note on the field
+ */
+package fallTest;
+
+public class NoteField
+{
+ private boolean failed = false;
+ private final int NOTESPEED = 5;
+ private int yPos = SongPlayer.HEIGHT;
+
+ public void gameTick() {
+ if (!failed) {
+ if (yPos > 0) {
+ yPos -= NOTESPEED;
+ }
+ else {
+ failed = true;
+ }
+ }
+ }
+
+ public int goalDistance() {
+ return (yPos-((SongPlayer.HEIGHT)/6));
+ }
+
+ public boolean getFailed() {
+ return failed;
+ }
+
+ public int getY() {
+ return yPos;
+ }
+}