Skip to content

fix(ItemBar): 아이템 버튼 초기화 로직 개선#392

Merged
nijuy merged 2 commits into
developfrom
fix/duplicate-item-button
Mar 31, 2026
Merged

fix(ItemBar): 아이템 버튼 초기화 로직 개선#392
nijuy merged 2 commits into
developfrom
fix/duplicate-item-button

Conversation

@nijuy
Copy link
Copy Markdown
Collaborator

@nijuy nijuy commented Mar 31, 2026

💻 개요

  • 이슈 대응

📋 변경 및 추가 사항

  • 아이템 버튼이 여러 개 그려지는 문제가 있었습니다

    재현 방법: 게스트 플레이 -> 게임 종료 후 로그인 -> 재시작

    스크린샷 2026-03-31 오후 9 55 51

    게스트 플레이일 때 그려졌던 아이템 버튼이 남아있음..!!

  • ItemBar에서 아이템 버튼을 생성할 때 기존 버튼을 정리하는 로직을 추가했어용

💬 To. 리뷰어

- 기존 버튼을 반드시 제거하도록
@nijuy nijuy self-assigned this Mar 31, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the ItemBar class to clear and destroy existing buttons before re-initializing the item list. The review feedback points out that button.destroy() should be called with { children: true } to ensure all nested PixiJS objects are properly disposed of, which prevents potential memory leaks.

Comment thread src/pages/games/SnackGame/game/ui/ItemBar.ts Outdated
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@nijuy nijuy merged commit 31548f2 into develop Mar 31, 2026
1 check passed
@nijuy nijuy deleted the fix/duplicate-item-button branch March 31, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant