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