Page 802 - 2
P. 802
Game클래스
private Image pad1 = new ImageIcon( 이미지파일위치).getImage(); 1~9 까지 써주기
private String title;
String difficulty;
private String musicTitle;
Music gameMusic;
int score = 0;
int combo = 0;
int maxCombo = 0;
int nowCombo = 0;
int j=0;
Beat[] beats = null;
private boolean isKorean;
boolean keyJudge;
String judge;
ArrayList<Note> noteList = new ArrayList<Note>();
public Game(String title, String difficulty, String musicTitle, boolean isKorean) {
this.title = title;
this.difficulty = difficulty;
this.musicTitle = musicTitle;
this.isKorean = isKorean;
gameMusic = new Music(this.musicTitle, false);
score = 0;
combo = 0;
}
public void ScreenDraw(Graphics2D g) {
g.drawImage(pad1~9, 각 패드 x, 각 패드 y, null);
for (int i = 0; i < noteList.size(); i++) {
Note note = noteList.get(i);
if (!note.isProceed()) {
noteList.remove(i);
j++;
i--;
} else {
note.screenDraw(g);
}
}
g.setColor(Color.white);
g . s e t R e n d e r i n g H i n t ( R e n d e r i n g H i n t s . K E Y _ T E X T _ A N T I A L I A S I N G ,
RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
g.setFont(new Font("Arial", Font.BOLD, 50));
g.drawString(score + "", 580, 100);
if (isKorean) {
- 802 -