Ejemplo n.º 1
0
 @Override
 public void actionPerformed(ActionEvent e) {
   if (pitchPane.getRotate() < 10 && pitchPane.getRotate() > -10 && side) {
     pitchPane.setRotate(pitchPane.getRotate() + 1);
     rolePane.setRotate(rolePane.getRotate() - 1);
   }
   if (pitchPane.getRotate() == 10) {
     pitchPane.setRotate(pitchPane.getRotate() - 1);
     rolePane.setRotate(rolePane.getRotate() - 1);
     side = false;
   }
   if (pitchPane.getRotate() < 10 && pitchPane.getRotate() > -10 && !side) {
     pitchPane.setRotate(pitchPane.getRotate() - 1);
     rolePane.setRotate(rolePane.getRotate() + 1);
   }
   if (pitchPane.getRotate() == -10) {
     side = true;
     pitchPane.setRotate(pitchPane.getRotate() + 1);
     rolePane.setRotate(rolePane.getRotate() + 1);
   }
 }
Ejemplo n.º 2
0
 public void updateAngle() {
   pitchLabel.setText(String.valueOf(pitchPane.getRotate()));
   roleLabel.setText(String.valueOf(rolePane.getRotate()));
 }