package Game;
/**
*
* @author Sasha
*/
public class Buttons extends javax.swing.JPanel {
private GameWorld world;
private int restart;
public Buttons() {
restart = 1;
world = new GameWorld();
}
public Buttons(GameWorld world) {
this.world = world;
initComponents();
}
@SuppressWarnings("unchecked")
private void QuitButtonActionPerformed(java.awt.event.ActionEvent evt) {
System.exit(0);
}
private void PauseButtonActionPerformed(java.awt.event.ActionEvent evt) {
world.setPaused(true);
}
private void PlayButtonActionPerformed(java.awt.event.ActionEvent evt) {
world.setPaused(false);
}
private void RestartButtonActionPerformed(java.awt.event.ActionEvent evt) {
restart++;
world.start();
world = new GameWorld();
}
private javax.swing.JButton PauseButton;
private javax.swing.JButton PlayButton;
private javax.swing.JButton QuitButton;
private javax.swing.JButton RestartButton;
}
This post has been edited by no2pencil: 18 March 2014 - 07:31 PM
Reason for edit:: added code tags

New Topic/Question
Reply


MultiQuote




|