1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-03-02 03:39:21 +00:00

Add basic sounds

This commit is contained in:
tobspr
2020-05-14 19:12:58 +02:00
parent e960773a15
commit af0f56b5e4
24 changed files with 87 additions and 56 deletions

View File

@@ -49,17 +49,23 @@ export class HubSystem extends GameSystemWithFilter {
const textOffsetY = -6;
// Deliver count
context.font = "bold 25px GameFont";
const delivered = this.root.hubGoals.getCurrentGoalDelivered();
if (delivered > 9999) {
context.font = "bold 16px GameFont";
} else if (delivered > 999) {
context.font = "bold 20px GameFont";
} else {
context.font = "bold 25px GameFont";
}
context.fillStyle = "#64666e";
context.textAlign = "left";
context.fillText(
"" + formatBigNumber(this.root.hubGoals.getCurrentGoalDelivered()),
pos.x + textOffsetX,
pos.y + textOffsetY
);
context.fillText("" + formatBigNumber(delivered), pos.x + textOffsetX, pos.y + textOffsetY);
// Required
context.font = "13px GameFont";
context.fillStyle = "#a4a6b0";
context.fillText(
"/ " + formatBigNumber(goals.required),