-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTile.java
More file actions
36 lines (30 loc) · 755 Bytes
/
Copy pathTile.java
File metadata and controls
36 lines (30 loc) · 755 Bytes
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
package uet.oop.bomberman.entities.tile;
import uet.oop.bomberman.entities.Entity;
import uet.oop.bomberman.graphics.Screen;
import uet.oop.bomberman.graphics.Sprite;
import uet.oop.bomberman.level.Coordinates;
/**
* Entity cố định, không di chuyển
*/
public abstract class Tile extends Entity {
public Tile(int x, int y, Sprite sprite) {
_x = x;
_y = y;
_sprite = sprite;
}
/**
* Mặc định không cho bất cứ một đối tượng nào đi qua
* @param e
* @return
*/
@Override
public boolean collide(Entity e) {
return false;
}
@Override
public void render(Screen screen) {
screen.renderEntity( Coordinates.tileToPixel(_x), Coordinates.tileToPixel(_y), this);
}
@Override
public void update() {}
}