Advertisement
Nick-O-Rama

SlotMachineTimer

Sep 29th, 2015
404
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.42 KB | None | 0 0
  1.     private void handleButtonAction(ActionEvent event) {
  2.         Timeline animation = new Timeline();
  3.         KeyFrame kf = new KeyFrame(Duration.millis(18), new EventHandler <ActionEvent>() {
  4.             public void handle(ActionEvent e) {
  5.                 spin();
  6.             }  
  7.         });
  8.         payout();
  9.         animation.setCycleCount(30);
  10.         animation.getKeyFrames().add(kf);
  11.         animation.play();
  12.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement