优化项目架构

This commit is contained in:
2025-09-15 19:10:37 +08:00
parent 4119ed3445
commit 26b856d74e
1361 changed files with 4 additions and 0 deletions

View File

@@ -0,0 +1,146 @@
[gd_scene load_steps=8 format=3 uid="uid://cfwj8rnm2j8s3"]
[ext_resource type="Script" uid="uid://cn6a0803t1bmu" path="res://Scene/NewPet/NewPetBase.gd" id="1_bfbjx"]
[ext_resource type="Texture2D" uid="uid://lx0l12qrituk" path="res://assets/宠物图片/一堆小怪.png" id="2_gnd2w"]
[ext_resource type="Texture2D" uid="uid://dciakkwnchcga" path="res://assets/我的世界图片/武器工具/木剑.png" id="3_bfbjx"]
[sub_resource type="AtlasTexture" id="AtlasTexture_h4hw6"]
atlas = ExtResource("2_gnd2w")
region = Rect2(0, 0, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_51c25"]
atlas = ExtResource("2_gnd2w")
region = Rect2(24, 0, 24, 24)
[sub_resource type="SpriteFrames" id="SpriteFrames_wmdx5"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_h4hw6")
}],
"loop": true,
"name": &"idle",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_h4hw6")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_51c25")
}],
"loop": true,
"name": &"walk",
"speed": 8.0
}]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_h4hw6"]
size = Vector2(79, 92)
[node name="PetBase" type="Area2D"]
script = ExtResource("1_bfbjx")
[node name="PetImage" type="AnimatedSprite2D" parent="."]
scale = Vector2(4, 4)
sprite_frames = SubResource("SpriteFrames_wmdx5")
animation = &"walk"
autoplay = "walk"
[node name="LeftToolImage" type="Sprite2D" parent="PetImage"]
z_index = 5
position = Vector2(-10.5, 3)
texture = ExtResource("3_bfbjx")
flip_h = true
[node name="RightToolImage" type="Sprite2D" parent="PetImage"]
show_behind_parent = true
position = Vector2(-7.5, -6.25)
texture = ExtResource("3_bfbjx")
flip_h = true
[node name="VolumeCollision" type="CollisionShape2D" parent="."]
position = Vector2(0.5, 2)
shape = SubResource("RectangleShape2D_h4hw6")
[node name="PetInformVBox" type="VBoxContainer" parent="."]
offset_left = -72.0
offset_top = -261.0
offset_right = 430.0
offset_bottom = 453.0
scale = Vector2(0.3, 0.3)
alignment = 2
[node name="PetNameRichText" type="RichTextLabel" parent="PetInformVBox"]
layout_mode = 2
size_flags_vertical = 3
theme_override_font_sizes/normal_font_size = 40
bbcode_enabled = true
text = "萌芽小绿人"
horizontal_alignment = 1
vertical_alignment = 2
[node name="ArmorBar" type="ProgressBar" parent="PetInformVBox"]
modulate = Color(0.758192, 0.758192, 0.758192, 1)
custom_minimum_size = Vector2(0, 60)
layout_mode = 2
show_percentage = false
[node name="ArmorLabel" type="Label" parent="PetInformVBox/ArmorBar"]
layout_mode = 0
offset_right = 502.0
offset_bottom = 60.0
theme_override_font_sizes/font_size = 30
text = "盔甲值:100/100"
horizontal_alignment = 1
vertical_alignment = 1
[node name="ShieldBar" type="ProgressBar" parent="PetInformVBox"]
modulate = Color(0, 1, 1, 1)
custom_minimum_size = Vector2(0, 60)
layout_mode = 2
show_percentage = false
[node name="ShieldLabel" type="Label" parent="PetInformVBox/ShieldBar"]
layout_mode = 0
offset_right = 502.0
offset_bottom = 60.0
theme_override_font_sizes/font_size = 30
text = "护盾值:100/100"
horizontal_alignment = 1
vertical_alignment = 1
[node name="HealthBar" type="ProgressBar" parent="PetInformVBox"]
modulate = Color(0, 1, 0, 1)
custom_minimum_size = Vector2(0, 60)
layout_mode = 2
show_percentage = false
[node name="HealthLabel" type="Label" parent="PetInformVBox/HealthBar"]
layout_mode = 0
offset_right = 502.0
offset_bottom = 60.0
theme_override_font_sizes/font_size = 30
text = "生命值:100/100"
horizontal_alignment = 1
vertical_alignment = 1
[node name="StatusEffects" type="HBoxContainer" parent="."]
offset_left = -30.0
offset_top = -65.0
offset_right = 30.0
offset_bottom = -55.0
[node name="AttackTimer" type="Timer" parent="."]
[node name="MoveTimer" type="Timer" parent="."]
wait_time = 0.1
autostart = true
[node name="StatusTimer" type="Timer" parent="."]
autostart = true
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
[node name="HitEffect" type="Node2D" parent="."]
[node name="DeathEffect" type="Node2D" parent="."]