1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-29 23:41:54 +08:00

feat(UI): 添加武器面板功能

实现武器面板的打开关闭逻辑,包括:
- 创建WeaponPanel脚本处理武器转移
- 在UIState中添加武器面板输入控制
- 更新UI场景添加武器面板节点
- 简化武器面板场景结构
This commit is contained in:
2025-09-06 11:23:11 +08:00
parent a083069848
commit 81c84e4dc8
5 changed files with 34 additions and 14 deletions
+1
View File
@@ -1,3 +1,4 @@
@tool
extends FullscreenPanelBase
@onready var audio = $"%audio"
+13
View File
@@ -0,0 +1,13 @@
@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)