mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 23:11:54 +08:00
81c84e4dc8
实现武器面板的打开关闭逻辑,包括: - 创建WeaponPanel脚本处理武器转移 - 在UIState中添加武器面板输入控制 - 更新UI场景添加武器面板节点 - 简化武器面板场景结构
14 lines
323 B
GDScript
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)
|