blob: 8624f08a9ef65f1d49726f82bf14973797e8427f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
public class Tile {
public int x;
public int y;
public int len;
public TileType tileType = TileType.GRASS;
public EntityType entityType = EntityType.NULL;
public boolean selected = false;
public boolean attack = false;
public int width;
public Tile (int row, int col, int window, int width) {
this.width = width;
this.calc(row, col, window);
}
public void calc (int row, int col, int window) {
this.len = (int) (window/(double)this.width);
this.x = col*len;
this.y = row*len;
}
}
|