blob: a24fea039e57fc024b91f1240bd3428673abfcd4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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;
}
}
|