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

feat: 新增角色系统及基础功能实现

新增HCN、Lynx和MuyangDog三个可玩角色及其相关资源
实现角色选择界面和角色属性系统
重构玩家生成逻辑以支持角色选择
优化角色卡片UI显示效果
This commit is contained in:
2026-05-04 21:34:57 +08:00
parent 4d1f68cac1
commit dc4b080a09
23 changed files with 362 additions and 48 deletions
+34 -13
View File
@@ -1,15 +1,14 @@
[gd_scene format=3 uid="uid://m8a4nay1pmmg"]
[ext_resource type="Script" uid="uid://cd1xb8m6rvoph" path="res://scripts/Structs/Character.gd" id="1_dt83t"]
[ext_resource type="Texture2D" uid="uid://dwwpkn4q07ja2" path="res://icon.svg" id="2_dt83t"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_5td0u"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_dt83t"]
content_margin_left = 20.0
content_margin_top = 20.0
content_margin_right = 20.0
content_margin_bottom = 20.0
bg_color = Color(0, 0, 0, 0.8)
border_width_top = 10
border_width_bottom = 10
border_color = Color(1, 1, 1, 1)
border_blend = true
corner_radius_top_left = 15
@@ -20,9 +19,12 @@ corner_detail = 1
font_size = 20
outline_size = 1
[sub_resource type="LabelSettings" id="LabelSettings_fnmic"]
font_size = 12
font_color = Color(1, 1, 1, 0.39215687)
[sub_resource type="LabelSettings" id="LabelSettings_myhk0"]
font_size = 12
font_color = Color(0.5, 0.5, 0.5, 1)
[sub_resource type="Animation" id="Animation_dt83t"]
length = 0.001
@@ -34,7 +36,7 @@ tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"handle_modes": PackedInt32Array(0),
"points": PackedFloat32Array(0.7, -0.25, 0, 0.25, 0),
"points": PackedFloat32Array(0.85, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0)
}
tracks/1/type = "bezier"
@@ -45,7 +47,7 @@ tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"handle_modes": PackedInt32Array(0),
"points": PackedFloat32Array(0.7, -0.25, 0, 0.25, 0),
"points": PackedFloat32Array(0.85, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0)
}
tracks/2/type = "value"
@@ -85,7 +87,7 @@ tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"handle_modes": PackedInt32Array(0, 0),
"points": PackedFloat32Array(1, 0, 0, 0, -0.3, 0.7, 0, 0, 0, 0),
"points": PackedFloat32Array(1, 0, 0, 0, -0.3, 0.85, 0, 0, 0, 0),
"times": PackedFloat32Array(0, 0.5)
}
tracks/1/type = "bezier"
@@ -96,7 +98,7 @@ tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"handle_modes": PackedInt32Array(2, 0),
"points": PackedFloat32Array(1, 0, 0, 0, -0.3, 0.7, 0, 0, 0, 0),
"points": PackedFloat32Array(1, 0, 0, 0, -0.3, 0.85, 0, 0, 0, 0),
"times": PackedFloat32Array(0, 0.5)
}
tracks/2/type = "value"
@@ -136,7 +138,7 @@ tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"handle_modes": PackedInt32Array(0, 0),
"points": PackedFloat32Array(0.7, 0, 0, 0, 0.3, 1, 0, 0, 0, 0),
"points": PackedFloat32Array(0.85, 0, 0, 0, 0.3, 1, 0, 0, 0, 0),
"times": PackedFloat32Array(0, 0.5)
}
tracks/1/type = "bezier"
@@ -147,7 +149,7 @@ tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"handle_modes": PackedInt32Array(0, 0),
"points": PackedFloat32Array(0.7, 0, 0, 0, 0.3, 1, 0, 0, 0, 0),
"points": PackedFloat32Array(0.85, 0, 0, 0, 0.3, 1, 0, 0, 0, 0),
"times": PackedFloat32Array(0, 0.5)
}
tracks/2/type = "value"
@@ -186,9 +188,13 @@ _data = {
modulate = Color(1, 1, 1, 0.5)
offset_right = 226.0
offset_bottom = 212.0
scale = Vector2(0.7, 0.7)
theme_override_styles/panel = SubResource("StyleBoxFlat_5td0u")
scale = Vector2(0.85, 0.85)
theme_override_styles/panel = SubResource("StyleBoxFlat_dt83t")
script = ExtResource("1_dt83t")
avatar = ExtResource("2_dt83t")
description = "这是一个描述,"
fields = Array[int]([0])
fieldValues = Array[float]([0.0])
[node name="wrapper" type="VBoxContainer" parent="." unique_id=2023039659]
layout_mode = 2
@@ -200,24 +206,39 @@ custom_minimum_size = Vector2(100, 100)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture = ExtResource("2_dt83t")
expand_mode = 1
stretch_mode = 5
[node name="infoContainer" type="VBoxContainer" parent="wrapper" unique_id=143242635]
layout_mode = 2
theme_override_constants/separation = 10
[node name="nameLabel" type="Label" parent="wrapper/infoContainer" unique_id=516147781]
[node name="VBoxContainer" type="VBoxContainer" parent="wrapper/infoContainer" unique_id=533915880]
layout_mode = 2
theme_override_constants/separation = 0
[node name="nameLabel" type="Label" parent="wrapper/infoContainer/VBoxContainer" unique_id=516147781]
unique_name_in_owner = true
layout_mode = 2
text = "Unknown Character"
label_settings = SubResource("LabelSettings_dt83t")
horizontal_alignment = 1
[node name="sloganLabel" type="Label" parent="wrapper/infoContainer/VBoxContainer" unique_id=280562204]
unique_name_in_owner = true
layout_mode = 2
text = "“Slogan”"
label_settings = SubResource("LabelSettings_fnmic")
horizontal_alignment = 1
[node name="descriptionLabel" type="Label" parent="wrapper/infoContainer" unique_id=808054282]
unique_name_in_owner = true
custom_minimum_size = Vector2(100, 10)
layout_mode = 2
text = "这是一个描述,"
label_settings = SubResource("LabelSettings_myhk0")
horizontal_alignment = 1
autowrap_mode = 3
[node name="fields" type="VBoxContainer" parent="wrapper" unique_id=437152370]
+129
View File
@@ -0,0 +1,129 @@
[gd_scene format=3 uid="uid://bs863g2s8r770"]
[ext_resource type="PackedScene" uid="uid://cvogxi7mktumf" path="res://components/Abstracts/EntityBase.tscn" id="1_6i3xq"]
[ext_resource type="Script" uid="uid://r5gm7rcya35p" path="res://scripts/Contents/Characters/PlayerBase.gd" id="2_t2kq6"]
[ext_resource type="AudioStream" uid="uid://cdrevrq7n6yqa" path="res://resources/sounds/effect/Boing.mp3" id="3_lv2jw"]
[ext_resource type="AudioStream" uid="uid://benyec5bqni0b" path="res://resources/sounds/effect/Chomp.wav" id="4_7bgj3"]
[ext_resource type="AudioStream" uid="uid://dmxh3bpk8vyy5" path="res://resources/sounds/effect/Coin.mp3" id="5_na3ea"]
[ext_resource type="AudioStream" uid="uid://4wuuf1osk0yv" path="res://resources/sounds/effect/Low Boing.wav" id="6_0o8ke"]
[ext_resource type="Texture2D" uid="uid://dwwpkn4q07ja2" path="res://icon.svg" id="7_kwh6m"]
[sub_resource type="Curve" id="Curve_da2ca"]
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
point_count = 2
[sub_resource type="CurveTexture" id="CurveTexture_0omr3"]
curve = SubResource("Curve_da2ca")
[sub_resource type="Curve" id="Curve_joj4g"]
_limits = [-360.0, 1.0, 0.0, 1.0]
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, -360), 0.0, 0.0, 0, 0]
point_count = 2
[sub_resource type="CurveTexture" id="CurveTexture_jluqw"]
curve = SubResource("Curve_joj4g")
[sub_resource type="Curve" id="Curve_0omr3"]
_data = [Vector2(0.5, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
point_count = 2
[sub_resource type="CurveTexture" id="CurveTexture_joj4g"]
curve = SubResource("Curve_0omr3")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_joj4g"]
particle_flag_disable_z = true
emission_shape = 1
emission_sphere_radius = 300.0
angle_min = 1.0728835e-05
angle_max = 360.00003
angle_curve = SubResource("CurveTexture_jluqw")
gravity = Vector3(0, 0, 0)
radial_accel_min = -200.0
radial_accel_max = -200.0
scale_min = 5.0
scale_max = 10.0
scale_curve = SubResource("CurveTexture_joj4g")
alpha_curve = SubResource("CurveTexture_0omr3")
[sub_resource type="SpriteFrames" id="SpriteFrames_4v2ol"]
animations = [{
"frames": [],
"loop": true,
"name": &"idle",
"speed": 1.0
}, {
"frames": [],
"loop": true,
"name": &"walk",
"speed": 3.0
}]
[sub_resource type="SpriteFrames" id="SpriteFrames_jluqw"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("7_kwh6m")
}],
"loop": true,
"name": &"idle",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": ExtResource("7_kwh6m")
}],
"loop": true,
"name": &"walk",
"speed": 5.0
}]
[sub_resource type="CircleShape2D" id="CircleShape2D_h1v0q"]
radius = 61.204575
[node name="PlayerBase" unique_id=1711205167 instance=ExtResource("1_6i3xq")]
script = ExtResource("2_t2kq6")
displayName = "玩家实体"
metadata/_edit_horizontal_guides_ = [-188.0]
metadata/_edit_vertical_guides_ = [71.0]
[node name="chargeParticle" type="GPUParticles2D" parent="." index="0" unique_id=1592717470]
unique_name_in_owner = true
position = Vector2(0, -54)
amount = 100
process_material = SubResource("ParticleProcessMaterial_joj4g")
[node name="weaponStore" parent="." index="2"]
process_mode = 4
[node name="sprint" parent="sounds" index="0"]
stream = ExtResource("3_lv2jw")
[node name="heal" parent="sounds" index="1"]
stream = ExtResource("4_7bgj3")
[node name="miss" parent="sounds" index="2"]
stream = ExtResource("5_na3ea")
[node name="hurt" parent="sounds" index="3"]
stream = ExtResource("6_0o8ke")
[node name="texture" parent="." index="4"]
position = Vector2(0, -47)
sprite_frames = SubResource("SpriteFrames_4v2ol")
animation = &"walk"
[node name="staticAnimation" parent="texture" index="1"]
position = Vector2(0, -17)
sprite_frames = SubResource("SpriteFrames_jluqw")
animation = &"walk"
[node name="hitbox" parent="texture/hurtbox" index="0"]
position = Vector2(-2, -18)
shape = SubResource("CircleShape2D_h1v0q")
[node name="normal" type="Node2D" parent="texture/weapons" index="0" unique_id=1939030218]
position = Vector2(1, -13)
[node name="statebar" parent="." index="5" node_paths=PackedStringArray("entity")]
position = Vector2(0, -150)
entity = NodePath("..")