diff --git a/src/pages/games/SnackGame/game/ui/ItemBar.ts b/src/pages/games/SnackGame/game/ui/ItemBar.ts index 4c23524..8105679 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({ children: true })); + this.buttons = []; + items.forEach(({ type, count, onUse }, idx) => { const button = new ItemButton({ type,