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 d0e3564933 feat(武器系统): 重构武器信息显示逻辑并添加新功能
重构武器卡片的信息显示逻辑,使用ItemShow组件替代原有Label显示
添加武器升级和镶嵌前的预览功能
为武器描述添加升级前后数值对比显示
新增FREQUENCY数据类型支持
统一子弹生命周期参数为lifeTime
2025-10-01 07:58:09 +08:00

17 lines
395 B
GDScript

@tool
extends FullscreenPanelBase
@onready var box = $"%box"
func beforeOpen(_args: Array = []):
for weapon in UIState.player.weapons:
weapon.show()
weapon.rebuildInfo()
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)