[Refactor] Cleanup egg-counter-container (#5892)

This commit is contained in:
Sirz Benjie 2025-05-30 18:08:52 -05:00 committed by GitHub
parent e1be360e74
commit ed0251ea90
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -43,14 +43,13 @@ export default class EggCounterContainer extends Phaser.GameObjects.Container {
this.add(this.eggCountWindow); this.add(this.eggCountWindow);
const eggSprite = globalScene.add.sprite(19, 18, "egg", "egg_0"); const eggSprite = globalScene.add.sprite(19, 18, "egg", "egg_0").setScale(0.32);
eggSprite.setScale(0.32);
this.eggCountText = addTextObject(28, 13, `${this.eggCount}`, TextStyle.MESSAGE, { fontSize: "66px" }); this.eggCountText = addTextObject(28, 13, `${this.eggCount}`, TextStyle.MESSAGE, { fontSize: "66px" }).setName(
this.eggCountText.setName("text-egg-count"); "text-egg-count",
);
this.add(eggSprite); this.add([eggSprite, this.eggCountText]);
this.add(this.eggCountText);
} }
/** /**