mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-27 22:41:56 +08:00
feat(武器系统): 添加武器背包功能及武器展示组件
实现武器背包功能,用于存储已获得的武器名称。新增WeaponShow组件,根据操作类型显示不同的武器信息。修改Feed.gd以支持武器展示逻辑,包括获取和提炼两种操作状态。
This commit is contained in:
@@ -79,6 +79,15 @@ func rebuildInfo():
|
||||
fieldsBox.add_child(fieldShow)
|
||||
if noField:
|
||||
fieldsBox.add_child(QuickUI.smallText("无词条"))
|
||||
for i in weaponsBox.get_children():
|
||||
i.queue_free()
|
||||
for weapon in weapons:
|
||||
var weaponShow: WeaponShow = ComponentManager.getUIComponent("WeaponShow").instantiate()
|
||||
weaponShow.weapon = weapon
|
||||
if is_instance_valid(UIState.player):
|
||||
weaponShow.operation = WeaponShow.Operation.EXTRACT if UIState.player.weaponBag.has(weapon.instantiate().displayName) else WeaponShow.Operation.GET
|
||||
weaponShow.visible = true
|
||||
weaponsBox.add_child(weaponShow)
|
||||
for i in costsBox.get_children():
|
||||
i.queue_free()
|
||||
for i in range(min(costs.size(), costCounts.size())):
|
||||
|
||||
Reference in New Issue
Block a user