1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 15:01:53 +08:00
Files
Dog-Lynx-And-HCN/scripts/Contents/Panels/WeaponPanel.gd
T
fallingshrimp 81c84e4dc8 feat(UI): 添加武器面板功能
实现武器面板的打开关闭逻辑,包括:
- 创建WeaponPanel脚本处理武器转移
- 在UIState中添加武器面板输入控制
- 更新UI场景添加武器面板节点
- 简化武器面板场景结构
2025-09-06 11:23:11 +08:00

14 lines
323 B
GDScript

@tool
extends FullscreenPanelBase
@onready var box = $"%box"
func beforeOpen():
for weapon in UIState.player.weapons:
UIState.player.weaponStore.remove_child(weapon)
box.add_child(weapon)
func afterClose():
for weapon in box.get_children():
box.remove_child(weapon)
UIState.player.weaponStore.add_child(weapon)