()
| 96 | } |
| 97 | |
| 98 | public updateAll(){ |
| 99 | // We erase |
| 100 | this.renderArea.resetAllButSize(); |
| 101 | |
| 102 | // We draw the borders |
| 103 | if(Saving.loadBool("statusBarUnlocked")){ |
| 104 | this.renderArea.drawString("+", 0, 0); |
| 105 | this.renderArea.drawString("+", this.renderArea.getWidth() - 1, 0); |
| 106 | this.renderArea.drawString("+", 0, 5); |
| 107 | this.renderArea.drawString("+", this.renderArea.getWidth() - 1, 5); |
| 108 | this.renderArea.drawVerticalLine("|", 0, 1, 4); |
| 109 | this.renderArea.drawVerticalLine("|", this.renderArea.getWidth() - 1, 1, 4); |
| 110 | this.renderArea.drawHorizontalLine("-", 1, this.renderArea.getWidth() - 1, 0); |
| 111 | this.renderArea.drawHorizontalLine("-", 1, this.renderArea.getWidth() - 1, 5); |
| 112 | } |
| 113 | |
| 114 | // We draw the candies we have |
| 115 | this.renderArea.drawString(this.game.getCandies().getCurrentAsString(26), 2, 1); |
| 116 | |
| 117 | // We draw the lollipops we have, if we had at least one at some point |
| 118 | if(this.game.getLollipops().getMax() > 0) this.renderArea.drawString(this.game.getLollipops().getCurrentAsString(26), 2, 2); |
| 119 | |
| 120 | // We draw the chocolate bars we have, if we had at least one at some point |
| 121 | if(this.game.getChocolateBars().getMax() > 0) this.renderArea.drawString(this.game.getChocolateBars().getCurrentAsString(26), 2, 3); |
| 122 | |
| 123 | // We draw the pains au chocolat we have, if we had at least one at some point |
| 124 | if(this.game.getPainsAuChocolat().getMax() > 0) this.renderArea.drawString(this.game.getPainsAuChocolat().getCurrentAsString(26), 2, 4); |
| 125 | |
| 126 | // We draw tabs |
| 127 | this.drawTabs(); |
| 128 | |
| 129 | // We draw the health bar |
| 130 | this.updateHealthBar(); |
| 131 | |
| 132 | // We draw the stuff about the status bar's corners |
| 133 | this.drawStatusBarCornersStuff(); |
| 134 | } |
| 135 | |
| 136 | public updateHealthBar(): void{ |
| 137 | // We update the health bar if it isn't null |
no test coverage detected