Move sleep detector to renderer

This commit is contained in:
Patrick 'Quezler' Mounier
2020-03-05 10:08:15 +01:00
parent e5e4884448
commit 79c965bf8d
2 changed files with 4 additions and 5 deletions

View File

@@ -282,6 +282,10 @@ public class BlockRenderer implements Disposable{
block.drawLight(request.tile);
}else if(request.layer == block.layer){
block.drawLayer(request.tile);
// fixme: someday remove these 3 debugging lines
Lines.stroke(1f, request.tile.entity.isSleeping() ? Color.red : Color.green);
Lines.circle(request.tile.drawx() + (tilesize/3f), request.tile.drawy() - (tilesize/3f), 0.5f);
Draw.reset();
}else if(request.layer == block.layer2){
block.drawLayer2(request.tile);
}

View File

@@ -84,11 +84,6 @@ public class CraterConveyor extends Block implements Autotiler{
public void drawLayer(Tile tile){
CraterConveyorEntity entity = tile.ent();
// fixme: someday remove these 3 debugging lines
Lines.stroke(1f, entity.isSleeping() ? Color.red : Color.green);
Lines.circle(tile.drawx() + (tilesize/3f), tile.drawy() - (tilesize/3f), 0.5f);
Draw.reset();
// no from == no crater
if(entity.from == Pos.invalid) return;