progress
This commit is contained in:
parent
a99a53868b
commit
5bfb2aba9b
@ -23,7 +23,6 @@ public class Piece extends Application{
|
|||||||
double y;
|
double y;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void start(Stage primaryStage) throws Exception {
|
public void start(Stage primaryStage) throws Exception {
|
||||||
|
|
||||||
Polygon piece1 = new Polygon();
|
Polygon piece1 = new Polygon();
|
||||||
@ -144,6 +143,7 @@ public class Piece extends Application{
|
|||||||
|
|
||||||
}
|
}
|
||||||
//double click delayed bug to fix
|
//double click delayed bug to fix
|
||||||
|
//ftm just the last piece implemented can be rotated
|
||||||
public static void rotaterght (Node node) {
|
public static void rotaterght (Node node) {
|
||||||
RotateTransition rotaterght = new RotateTransition();
|
RotateTransition rotaterght = new RotateTransition();
|
||||||
//setting attributes for the RotateTransition
|
//setting attributes for the RotateTransition
|
||||||
@ -155,9 +155,9 @@ public class Piece extends Application{
|
|||||||
rotaterght.play();}
|
rotaterght.play();}
|
||||||
|
|
||||||
public static void rotatelft (Node node) {
|
public static void rotatelft (Node node) {
|
||||||
//Instantiating RotateTransition class to create the animation (rotation to the left)
|
|
||||||
RotateTransition rotatelft = new RotateTransition();
|
RotateTransition rotatelft = new RotateTransition();
|
||||||
//setting attributes for the RotateTransition
|
|
||||||
rotatelft.setByAngle(-90);// minus to rotate to the left
|
rotatelft.setByAngle(-90);// minus to rotate to the left
|
||||||
rotatelft.autoReverseProperty();
|
rotatelft.autoReverseProperty();
|
||||||
rotatelft.setDuration(Duration.millis(1000));
|
rotatelft.setDuration(Duration.millis(1000));
|
||||||
|
Loading…
Reference in New Issue
Block a user