Move sleep detector to renderer
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user