v0.4.2: fixed some bugs with tilemap updating

This commit is contained in:
Evan Debenham
2016-08-27 01:13:56 -04:00
committed by Evan Debenham
parent a8e04b51ca
commit e43e7b995d
2 changed files with 10 additions and 3 deletions

View File

@@ -88,11 +88,17 @@ public class Tilemap extends Visual {
quads = Quad.createSet( size );
updated.set( 0, 0, mapWidth, mapHeight );
updateMap();
}
//forces a full update, including new buffer and culling recalculation
public synchronized void updateMap(){
updated.set( 0, 0, mapWidth, mapHeight );
if (buffer != null) {
buffer.delete();
}
buffer = null;
camX = null;
}
public synchronized void updateMapCell(int cell){