-
Notifications
You must be signed in to change notification settings - Fork 0
/
object.java
76 lines (43 loc) · 1.13 KB
/
object.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.awt.*;
import java.util.List;
import java.util.ArrayList;
public class object {
double x;
double y;
int width;
int height;
Image img;
boolean catch_flag;
int mass;
List<String> include = new ArrayList<>(); // maybe have(use random to choice one)
// List<String> contain = {"", "", "", "", ""}; // must have
String type = "";
final static String lucky_block = "lucky";
final static String dynamite_block = "dynamite";
final static String normal = "normal";
// object's worth
int valued;
boolean obj_visible = true;
int draw(Graphics graphic){
if (window.window_state == window.state_game){
obj_visible = true;
} else if (window.window_state == window.state_shop){
obj_visible = false;
}
if (obj_visible){
graphic.drawImage(img, (int)x, (int)y, null);
}
return 0;
}
public int getWidth(){
return width;
}
int remove(){
x = -1000;
y = -1000;
return 0;
}
int in_box(){
return 0;
}
}