This commit is contained in:
Anuken
2020-04-23 00:41:18 -04:00
parent 18b68fefed
commit 2538273402
7 changed files with 61 additions and 33 deletions
@@ -102,24 +102,26 @@ public class BlockForge extends Block{
}
if(recipe != null){
TextureRegion region = recipe.icon(Cicon.full);
Draw.draw(Layer.blockOver, () -> {
TextureRegion region = recipe.icon(Cicon.full);
Shaders.build.region = region;
Shaders.build.progress = progress / recipe.buildCost;
Shaders.build.color.set(Pal.accent);
Shaders.build.color.a = heat;
Shaders.build.time = -time / 20f;
Shaders.build.region = region;
Shaders.build.progress = progress / recipe.buildCost;
Shaders.build.color.set(Pal.accent);
Shaders.build.color.a = heat;
Shaders.build.time = -time / 20f;
Draw.shader(Shaders.build);
Draw.rect(region, x, y);
Draw.shader();
Draw.shader(Shaders.build);
Draw.rect(region, x, y);
Draw.shader();
Draw.color(Pal.accent);
Draw.alpha(heat);
Draw.color(Pal.accent);
Draw.alpha(heat);
Lines.lineAngleCenter(x + Mathf.sin(time, 20f, Vars.tilesize / 2f * size - 2f), y, 90, size * Vars.tilesize - 4f);
Lines.lineAngleCenter(x + Mathf.sin(time, 20f, Vars.tilesize / 2f * size - 2f), y, 90, size * Vars.tilesize - 4f);
Draw.reset();
Draw.reset();
});
}
}
@@ -197,8 +197,9 @@ public class CoreBlock extends StorageBlock{
super.draw();
if(heat > 0.001f){
Draw.z(Layer.blockOver);
Drawf.drawRespawn(this, heat, progress, time, unitType, lastRequested);
Draw.draw(Layer.blockOver, () -> {
Drawf.drawRespawn(this, heat, progress, time, unitType, lastRequested);
});
}
}