Moved over map generator / Fixed logic updating on both threads

This commit is contained in:
Anuken
2018-06-20 11:09:44 -04:00
parent 33a278ccb4
commit 56bb23400a
9 changed files with 41 additions and 280 deletions
@@ -39,6 +39,9 @@ public class FloorRenderer {
}
public void drawFloor(){
if(cache == null){
return;
}
OrthographicCamera camera = Core.camera;
@@ -103,6 +106,10 @@ public class FloorRenderer {
}
public void beginDraw(){
if(cache == null){
return;
}
cbatch.setProjectionMatrix(Core.camera.combined);
cbatch.beginDraw();
@@ -110,10 +117,18 @@ public class FloorRenderer {
}
public void endDraw(){
if(cache == null){
return;
}
cbatch.endDraw();
}
public void drawLayer(CacheLayer layer){
if(cache == null){
return;
}
OrthographicCamera camera = Core.camera;
int crangex = (int)(camera.viewportWidth * camera.zoom / (chunksize * tilesize))+1;