From 4e158006c637bf63a8bd45a2ca8e944b7b819947 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=A8=E8=90=BD=E5=9F=BA=E5=9B=B4=E8=99=BE?= <3161880837@qq.com> Date: Sat, 6 Sep 2025 11:36:02 +0800 Subject: [PATCH] =?UTF-8?q?fix(WeaponPanel):=20=E4=BF=AE=E5=A4=8D=E6=AD=A6?= =?UTF-8?q?=E5=99=A8=E9=9D=A2=E6=9D=BF=E5=88=87=E6=8D=A2=E6=97=B6=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E7=8A=B6=E6=80=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在打开面板前显示武器,关闭面板后隐藏武器,确保武器状态正确切换 --- scripts/Contents/Panels/WeaponPanel.gd | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/Contents/Panels/WeaponPanel.gd b/scripts/Contents/Panels/WeaponPanel.gd index f66626f..0725bd1 100644 --- a/scripts/Contents/Panels/WeaponPanel.gd +++ b/scripts/Contents/Panels/WeaponPanel.gd @@ -5,9 +5,11 @@ extends FullscreenPanelBase func beforeOpen(): for weapon in UIState.player.weapons: + weapon.show() UIState.player.weaponStore.remove_child(weapon) box.add_child(weapon) func afterClose(): for weapon in box.get_children(): + weapon.hide() box.remove_child(weapon) UIState.player.weaponStore.add_child(weapon)