use of io.anuke.mindustry.world.Layer in project Mindustry by Anuken.
the class BlockRenderer method drawBlocks.
public void drawBlocks(boolean top) {
Layer stopAt = top ? Layer.laser : Layer.overlay;
for (; iterateidx < requestidx; iterateidx++) {
if (iterateidx < requests.size - 1 && requests.get(iterateidx).layer.ordinal() > stopAt.ordinal()) {
break;
}
BlockRequest req = requests.get(iterateidx);
Block block = req.tile.block();
if (req.layer == Layer.block) {
block.draw(req.tile);
} else if (req.layer == block.layer) {
block.drawLayer(req.tile);
} else if (req.layer == block.layer2) {
block.drawLayer2(req.tile);
}
}
}
Aggregations