1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 06:51:54 +08:00

feat(武器系统): 添加武器背包功能及武器展示组件

实现武器背包功能,用于存储已获得的武器名称。新增WeaponShow组件,根据操作类型显示不同的武器信息。修改Feed.gd以支持武器展示逻辑,包括获取和提炼两种操作状态。
This commit is contained in:
2025-09-21 16:49:52 +08:00
parent ace6d3bf53
commit e5b23e7715
4 changed files with 64 additions and 4 deletions
+21 -4
View File
@@ -1,26 +1,43 @@
[gd_scene load_steps=3 format=3 uid="uid://c7747qr83iojj"]
[gd_scene load_steps=6 format=3 uid="uid://c7747qr83iojj"]
[ext_resource type="Theme" uid="uid://b6nox1qqh50ub" path="res://themes/smallText.tres" id="1_ua7kx"]
[ext_resource type="Script" path="res://scripts/Statemachine/WeaponShow.gd" id="2_cojxr"]
[ext_resource type="PackedScene" uid="uid://bbm8l3hr4ihar" path="res://components/UI/ItemShow.tscn" id="2_yqc2h"]
[ext_resource type="PackedScene" uid="uid://b2qhes4apaxsj" path="res://components/Weapons/NuclearBomb.tscn" id="3_gh1wm"]
[ext_resource type="Texture2D" uid="uid://cp57lmeohvo3o" path="res://resources/weapons/nuclear-bomb.png" id="4_yyc4p"]
[node name="WeaponShow" type="HBoxContainer"]
offset_right = 189.0
offset_bottom = 22.0
theme = ExtResource("1_ua7kx")
script = ExtResource("2_cojxr")
weapon = ExtResource("3_gh1wm")
[node name="operation" type="Label" parent="."]
unique_name_in_owner = true
layout_mode = 2
text = "获得/提炼"
text = "提炼"
[node name="avatar" type="TextureRect" parent="."]
unique_name_in_owner = true
visible = false
custom_minimum_size = Vector2(20, 20)
layout_mode = 2
size_flags_horizontal = 10
size_flags_vertical = 4
texture = ExtResource("4_yyc4p")
expand_mode = 1
stretch_mode = 5
[node name="name" type="Label" parent="."]
unique_name_in_owner = true
visible = false
layout_mode = 2
size_flags_horizontal = 10
text = "武器名称"
text = "核弹控制器"
[node name="soul" parent="." instance=ExtResource("2_yqc2h")]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 10
type = 4
count = 1