progress
This commit is contained in:
@@ -204,6 +204,8 @@ public class Renderer implements ApplicationListener{
|
|||||||
blocks.floor.endDraw();
|
blocks.floor.endDraw();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Draw.drawRange(Layer.blockBuilding, () -> Draw.shader(Shaders.blockbuild, false), () -> Draw.shader());
|
||||||
|
|
||||||
if(state.rules.lighting){
|
if(state.rules.lighting){
|
||||||
Draw.draw(Layer.light, lights::draw);
|
Draw.draw(Layer.light, lights::draw);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -181,19 +181,18 @@ public class BuildBlock extends Block{
|
|||||||
}
|
}
|
||||||
|
|
||||||
Draw.draw(Layer.blockBuilding, () -> {
|
Draw.draw(Layer.blockBuilding, () -> {
|
||||||
Draw.shader(Shaders.blockbuild);
|
|
||||||
Shaders.blockbuild.color = Pal.accent;
|
Shaders.blockbuild.color = Pal.accent;
|
||||||
|
|
||||||
Block target = cblock == null ? previous : cblock;
|
Block target = cblock == null ? previous : cblock;
|
||||||
|
|
||||||
if(target == null) return;
|
if(target != null){
|
||||||
|
for(TextureRegion region : target.getGeneratedIcons()){
|
||||||
|
Shaders.blockbuild.region = region;
|
||||||
|
Shaders.blockbuild.progress = progress;
|
||||||
|
|
||||||
for(TextureRegion region : target.getGeneratedIcons()){
|
Draw.rect(region, x, y, target.rotate ? tile.rotation() * 90 : 0);
|
||||||
Shaders.blockbuild.region = region;
|
Draw.flush();
|
||||||
Shaders.blockbuild.progress = progress;
|
}
|
||||||
|
|
||||||
Draw.rect(region, x, y, target.rotate ? tile.rotation() * 90 : 0);
|
|
||||||
Draw.flush();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user