-
Notifications
You must be signed in to change notification settings - Fork 0
/
windmill.java
66 lines (62 loc) · 1.88 KB
/
windmill.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import java.io.IOException;
import java.net.URL;
import java.util.ResourceBundle;
import javax.swing.plaf.basic.BasicInternalFrameUI.InternalFramePropertyChangeListener;
import javafx.animation.Animation;
import javafx.animation.AnimationTimer;
import javafx.animation.TranslateTransition;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
//import javafx.scene.input.DragEvent;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.Pane;
import javafx.scene.paint.Color;
import javafx.scene.paint.CycleMethod;
import javafx.scene.paint.LinearGradient;
import javafx.scene.paint.Stop;
import javafx.scene.shape.Rectangle;
import javafx.stage.Stage;
import javafx.util.Duration;
import javafx.scene.Node;
public class windmill
{
private int health;
private Image oimg= new Image("The_Will_Hero-main/bladefinal.png");
private ImageView orc;
private AnchorPane pane1;
private TranslateTransition transy ;
private TranslateTransition transx ;
private TranslateTransition transz ;
private ImageView avataView;
private double x;
private double y;
public windmill(AnchorPane p1, int x, int y, int X, int Y)
{
//avataView=avatar;
health =2;
transy = new TranslateTransition();
transx = new TranslateTransition();
transz = new TranslateTransition();
pane1=p1;
orc = new ImageView(oimg);
orc.setFitHeight(y);
orc.setFitWidth(x);
orc.setX(X);
orc.setY(Y);
// pane1 =pane;
p1.getChildren().add(orc);
orc.toBack();
}
public ImageView getwindmill()
{
return orc;
}
}