Tomato now depletes as expected

#story[1291]
This commit is contained in:
Connor Taylor-Brown
2017-09-21 12:10:33 +12:00
parent 10008f5452
commit 6c78e5d0b5
@@ -26,7 +26,7 @@ public class HealthSlider extends Pane {
public HealthSlider(Image fillImage) {
this.fillImage = fillImage;
this.crop = 0;
this.crop = 1;
this.backgroundSize = new BackgroundSize(
100,
100,
@@ -43,7 +43,7 @@ public class HealthSlider extends Pane {
}
private void drawSlider() {
int top = (int)(crop * fillImage.getHeight());
int top = Math.max(0,(int)(fillImage.getHeight() - crop * fillImage.getHeight()));
WritableImage croppedImage = new WritableImage(
fillImage.getPixelReader(),