Page 181 - MDP2022-3
P. 181
public void close() {
proceeded = false;
}
public Note(String noteType) {
if(Main.myGame.game.comboCount < 30 ) noteBasicImage = new
ImageIcon(Main.class.getResource("../images/noteBasic.png")).getImage();
else if(Main.myGame.game.comboCount >= 30 &&
Main.myGame.game.comboCount < 60) noteBasicImage = new
ImageIcon(Main.class.getResource("../images/note_score2.png")).getImage();
else if(Main.myGame.game.comboCount >= 60) noteBasicImage = new
ImageIcon(Main.class.getResource("../images/note_score4.png")).getImage();
if(noteType.equals("S")) {
x = 382;
}
else if(noteType.equals("D")) {
x = 486;
}
else if(noteType.equals("F")) {
x = 590;
}
else if(noteType.equals("J")) {
x = 694;
}
else if(noteType.equals("K")) {
x = 798;
}
this.noteType = noteType;
}
public void screenDraw(Graphics2D g) {
if(!noteType.equals("Space"))
{
g.drawImage(noteBasicImage, x, y, null);
}
else
{
g.drawImage(noteBasicImage, x, y, null);
g.drawImage(noteBasicImage, x + 100, y, null);
}
}
public void drop() {