From ed0251ea9055cd0c321cbe2d1865cc22f6993100 Mon Sep 17 00:00:00 2001 From: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com> Date: Fri, 30 May 2025 18:08:52 -0500 Subject: [PATCH] [Refactor] Cleanup egg-counter-container (#5892) --- src/ui/egg-counter-container.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/ui/egg-counter-container.ts b/src/ui/egg-counter-container.ts index 7bec7c97480..7bb32189681 100644 --- a/src/ui/egg-counter-container.ts +++ b/src/ui/egg-counter-container.ts @@ -43,14 +43,13 @@ export default class EggCounterContainer extends Phaser.GameObjects.Container { this.add(this.eggCountWindow); - const eggSprite = globalScene.add.sprite(19, 18, "egg", "egg_0"); - eggSprite.setScale(0.32); + const eggSprite = globalScene.add.sprite(19, 18, "egg", "egg_0").setScale(0.32); - this.eggCountText = addTextObject(28, 13, `${this.eggCount}`, TextStyle.MESSAGE, { fontSize: "66px" }); - this.eggCountText.setName("text-egg-count"); + this.eggCountText = addTextObject(28, 13, `${this.eggCount}`, TextStyle.MESSAGE, { fontSize: "66px" }).setName( + "text-egg-count", + ); - this.add(eggSprite); - this.add(this.eggCountText); + this.add([eggSprite, this.eggCountText]); } /**