Dots and eating works
This commit is contained in:
@ -4,17 +4,15 @@ import java.awt.image.BufferedImage;
|
||||
|
||||
public class MapTile {
|
||||
private final int value;
|
||||
private final BufferedImage image;
|
||||
private BufferedImage image;
|
||||
private final boolean solid;
|
||||
private final boolean[][] collisionMask;
|
||||
|
||||
public MapTile(BufferedImage image, int value) {
|
||||
this.value = value;
|
||||
this.image = image;
|
||||
// this.image = value != 0 ? MiscUtil.createOutlinedBox(16, 16, Color.blue, 2) : null;
|
||||
|
||||
this.solid = value != 0;
|
||||
this.collisionMask = createCollisionMask(image);
|
||||
this.collisionMask = value != 0 ? createCollisionMask(image) : null;
|
||||
}
|
||||
|
||||
public boolean[][] getCollisionMask() {
|
||||
@ -42,4 +40,12 @@ public class MapTile {
|
||||
public boolean isPassable() {
|
||||
return ! this.solid;
|
||||
}
|
||||
|
||||
public void setImage(BufferedImage img) {
|
||||
this.image = img;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return this.value;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user