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:
@@ -1,3 +1,4 @@
|
||||
@tool
|
||||
extends FullscreenPanelBase
|
||||
|
||||
@onready var audio = $"%audio"
|
||||
|
||||
@@ -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)
|
||||
Reference in New Issue
Block a user