@Override
    public void onKeyPress(KeyEvent e) {
        int key = e.getKeyCode();

        if(key == KeyEvent.VK_ESCAPE){
            GameMain.game.exit();
        }
        if(key == KeyEvent.VK_ENTER || key == KeyEvent.VK_SPACE){
            if(currentSelection == 0){
                setCurrentState(new PlayState());
            }else if(currentSelection == 1){
                GameMain.game.exit();
            }
        }else if(key == KeyEvent.VK_UP){
            currentSelection = 0;
        }else if(key == KeyEvent.VK_DOWN){
            currentSelection = 1;
        }
    }