Page 174 - MDP2022-3
P. 174
if(isResultScreen) {
g.setFont(new Font("Elephant", Font.BOLD, 70));
if(Main.score < 100) g.drawString(Integer.toString(Main.score), 600, 300);
else if(Main.score < 10000) g.drawString(Integer.toString(Main.score),
530, 300);
else if(Main.score < 100000) g.drawString(Integer.toString(Main.score),
500, 300);
else if(Main.score < 1000000) g.drawString(Integer.toString(Main.score),
470, 300);
else if(Main.score < 10000000) g.drawString(Integer.toString(Main.score),
440, 300);
}
if(isRankScreen) {
//랭크 화면에서 순위 표시 이벤트
g.setFont(new Font("", Font.BOLD, 70));
g.setColor(Color.white);
g.drawString(this.titleName , 400, 100);
g.drawString(scoreInput, 600, 250);
g.drawString(Integer.toString(Main.score), 600, 330);
}
paintComponents(g);
try {
Thread.sleep(5);
} catch (Exception e) {
e.printStackTrace();
}
this.repaint();
}
public void selectTrack(int nowSelected) {
if(selectedMusic != null)
selectedMusic.close();
titleImage = new ImageIcon(Main.class.getResource("../images/" +
trackList.get(nowSelected).getTitleImage())).getImage();
levelImage = new ImageIcon(Main.class.getResource("../images/" +
trackList.get(nowSelected).getLevelImage())).getImage();
selectedImage = new ImageIcon(Main.class.getResource("../images/" +
trackList.get(nowSelected).getStartImage())).getImage();
selectedMusic = new Music(trackList.get(nowSelected).getStartMusic(), true);
selectedMusic.start();
}
public void selectLeft(){
if(nowSelected == 0)