v0.7.3a: fixed all darts incorrect being consumed when tipping all
This commit is contained in:
@@ -85,6 +85,16 @@ public class Tilemap extends Visual {
|
||||
|
||||
updateMap();
|
||||
}
|
||||
|
||||
public Image image(int x, int y){
|
||||
if (!needsRender(x + mapWidth*y)){
|
||||
return null;
|
||||
} else {
|
||||
Image img = new Image(texture);
|
||||
img.frame(tileset.get(data[x + mapWidth * y]));
|
||||
return img;
|
||||
}
|
||||
}
|
||||
|
||||
//forces a full update, including new buffer
|
||||
public synchronized void updateMap(){
|
||||
@@ -254,6 +264,6 @@ public class Tilemap extends Visual {
|
||||
}
|
||||
|
||||
protected boolean needsRender(int pos){
|
||||
return true;
|
||||
return data[pos] >= 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user