Page 178 - MDP2022-3
P. 178
DynamicBeat.game.pressF();
}
else if(e.getKeyCode() == KeyEvent.VK_J) {
DynamicBeat.game.pressJ();
}
else if(e.getKeyCode() == KeyEvent.VK_K) {
DynamicBeat.game.pressK();
}
else if(e.getKeyCode() == KeyEvent.VK_R) {
System.out.println("press_Red");
if(Main.myGame.isFirstScreen == true)Main.myGame.enterMain();
if(Main.myGame.isMainScreen == true)Main.myGame.selectLeft();
if(Main.myGame.isResultScreen == true)Main.myGame.backMain();
}
else if(e.getKeyCode() == KeyEvent.VK_G) {
Main.myGame.game.comboCount = 0;
if(Main.myGame.isMainScreen == true)Main.myGame.gameStartSum();
else if(Main.myGame.isGameScreen == true)Main.myGame.backMain();
}
else if(e.getKeyCode() == KeyEvent.VK_B) {
if(Main.myGame.isFirstScreen == true)System.exit(1);
if(Main.myGame.isMainScreen == true)Main.myGame.selectRight();
if(Main.myGame.isResultScreen == true)Main.myGame.restart();
}
}
@Override
public void keyReleased(KeyEvent e) {
if(DynamicBeat.game == null) {
return;
}
if(e.getKeyCode() == KeyEvent.VK_S) {
DynamicBeat.game.releaseS();
}
else if(e.getKeyCode() == KeyEvent.VK_D) {
DynamicBeat.game.releaseD();
}
else if(e.getKeyCode() == KeyEvent.VK_F) {
DynamicBeat.game.releaseF();
}
else if(e.getKeyCode() == KeyEvent.VK_J) {
DynamicBeat.game.releaseJ();
}
else if(e.getKeyCode() == KeyEvent.VK_K) {