-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMessage.java
69 lines (54 loc) · 1.08 KB
/
Message.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
package uet.oop.bomberman.entities;
import uet.oop.bomberman.graphics.Screen;
import java.awt.*;
/**
* Hiển thị thông điệp
*/
public class Message extends Entity {
protected String _message;
protected int _duration;
protected Color _color;
protected int _size;
/**
* Hiển thị message khi tiêu diệt được Enemy ví dụ (+100)
* @param message
* @param x
* @param y
* @param duration
* @param color
* @param size
*/
public Message(String message, double x, double y, int duration, Color color, int size) {
_x =x;
_y = y;
_message = message;
_duration = duration * 60; //seconds
_color = color;
_size = size;
}
public int getDuration() {
return _duration;
}
public void setDuration(int _duration) {
this._duration = _duration;
}
public String getMessage() {
return _message;
}
public Color getColor() {
return _color;
}
public int getSize() {
return _size;
}
@Override
public void update() {
}
@Override
public void render(Screen screen) {
}
@Override
public boolean collide(Entity e) {
return true;
}
}