From 258cc4381cb3c5df208a92fe2835d81ff70582c0 Mon Sep 17 00:00:00 2001 From: nijuy Date: Sun, 4 Jan 2026 20:36:18 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix(ItemBar):=20=EB=B2=84=ED=8A=BC=20?= =?UTF-8?q?=EC=B4=88=EA=B8=B0=ED=99=94=20=EB=A1=9C=EC=A7=81=20=EA=B0=9C?= =?UTF-8?q?=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 기존 버튼을 반드시 제거하도록 --- src/pages/games/SnackGame/game/ui/ItemBar.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pages/games/SnackGame/game/ui/ItemBar.ts b/src/pages/games/SnackGame/game/ui/ItemBar.ts index 4c23524..d22d4f0 100644 --- a/src/pages/games/SnackGame/game/ui/ItemBar.ts +++ b/src/pages/games/SnackGame/game/ui/ItemBar.ts @@ -27,6 +27,9 @@ export class ItemBar extends Container { } public setup(items: ItemButtonOptions[]) { + this.buttons.forEach((button) => button.destroy()); + this.buttons = []; + items.forEach(({ type, count, onUse }, idx) => { const button = new ItemButton({ type, From 266e63b4ac14d6b4a557baa5a888374d5cfff8d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=9C=A0=EC=A7=84?= Date: Tue, 31 Mar 2026 22:00:40 +0900 Subject: [PATCH 2/2] =?UTF-8?q?refactor:=20=EC=9E=90=EC=8B=9D=20=EC=9A=94?= =?UTF-8?q?=EC=86=8C=EA=B9=8C=EC=A7=80=20=ED=95=A8=EA=BB=98=20=EC=A0=95?= =?UTF-8?q?=EB=A6=AC=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=98=B5=EC=85=98=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- src/pages/games/SnackGame/game/ui/ItemBar.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/games/SnackGame/game/ui/ItemBar.ts b/src/pages/games/SnackGame/game/ui/ItemBar.ts index d22d4f0..8105679 100644 --- a/src/pages/games/SnackGame/game/ui/ItemBar.ts +++ b/src/pages/games/SnackGame/game/ui/ItemBar.ts @@ -27,7 +27,7 @@ export class ItemBar extends Container { } public setup(items: ItemButtonOptions[]) { - this.buttons.forEach((button) => button.destroy()); + this.buttons.forEach((button) => button.destroy({ children: true })); this.buttons = []; items.forEach(({ type, count, onUse }, idx) => {