protected void levelFailed(Graphics2D g) { try { InputStream in = getClass().getResourceAsStream("/sounds/fail.wav"); m_as = new AudioStream(in); AudioPlayer.player.start(m_as); } catch (IOException e) { } _balls--; if (_balls == 0) { resetGame(); JOptionPane.showMessageDialog( null, "Game Over! Your score was " + _score + " and you reached level " + _level + "."); } else { _canvas.getBall().resetPosition(); _canvas.drawField(g); } repaint(); _appState = Constants.appStates.Paused; }
protected void onAbout() { JOptionPane.showMessageDialog(null, "Breakout! (c) 2009 Ben Lakey"); }