1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-29 15:31:54 +08:00
Files
Dog-Lynx-And-HCN/scripts/Contents/Panels/WeaponPanel.gd
T

29 lines
676 B
GDScript
Raw Normal View History

2025-09-06 11:23:11 +08:00
@tool
extends FullscreenPanelBase
@onready var box: Control = $%box
2025-09-06 11:23:11 +08:00
func beforeOpen(_args: Array = []):
2025-09-06 11:23:11 +08:00
for weapon in UIState.player.weapons:
weapon.show()
weapon.rebuildInfo()
weapon.sublimateOpened.connect(
func():
for w in UIState.player.weapons:
if w != weapon:
w.animator.play("hide")
)
weapon.sublimateClosed.connect(
func():
for w in UIState.player.weapons:
if w != weapon:
w.animator.play("show")
)
2025-09-06 11:23:11 +08:00
UIState.player.weaponStore.remove_child(weapon)
box.add_child(weapon)
func afterClose():
for weapon in box.get_children():
weapon.hide()
2025-09-06 11:23:11 +08:00
box.remove_child(weapon)
UIState.player.weaponStore.add_child(weapon)