-
Notifications
You must be signed in to change notification settings - Fork 0
/
weapon.java
76 lines (64 loc) · 1.98 KB
/
weapon.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
67
68
69
70
71
72
73
74
75
76
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 weapon {
private Image weapon;// = new Image("The_Will_Hero-main/w1.png");
private ImageView weapon1;
private int level = 2;
// private AnchorPane pane1;
public weapon(AnchorPane pane, int x, int y, double d, double e, String s) {
weapon = new Image(s);
weapon1 = new ImageView(weapon);
weapon1.setFitHeight(y);
weapon1.setFitWidth(x);
level = 2;
weapon1.setX(d);
weapon1.setY(e);
// pane1 =pane;
// pane.getChildren().add(weapon1);
}
public void upgradelvl() {
level++;
}
public int getlvl() {
return level;
}
public void setlayout(double d, double e) {
weapon1.setLayoutX(d);
weapon1.setLayoutY(e);
}
public void setinp(AnchorPane pane) {
pane.getChildren().add(weapon1);
}
// public weapon(AnchorPane scenePane, int x, int y, double layoutX, double
// layoutY) {
// }
public ImageView getIsl1() {
return weapon1;
}
}