1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-10 13:47:12 +08:00

feat(角色): 添加哈士奇角色及相关资源

添加哈士奇角色,包括角色脚本、贴图资源、子弹效果和音效
- 实现哈士奇的基础AI行为和攻击逻辑
- 添加专属子弹"吼叫声波"及其特效
- 更新Wave配置加入哈士奇角色
- 为猫角色添加中文显示名称
- 优化Ring着色器增加透明度参数
This commit is contained in:
2025-11-16 14:23:26 +08:00
parent be2e50f487
commit 5425e95c2f
14 changed files with 321 additions and 3 deletions
+124
View File
@@ -0,0 +1,124 @@
[gd_scene load_steps=12 format=3 uid="uid://dr2gq0mfe30xx"]
[ext_resource type="PackedScene" uid="uid://crtdkysmnkith" path="res://components/Abstracts/BulletBase.tscn" id="1_yfqj6"]
[ext_resource type="Shader" uid="uid://cnc1n2042ntv5" path="res://shaders/Ring.gdshader" id="2_ddosv"]
[ext_resource type="Script" uid="uid://brn88cqusk0q2" path="res://scripts/Contents/Bullets/DogCircle.gd" id="2_qyd4u"]
[ext_resource type="Script" uid="uid://cgb01lelfg73p" path="res://scripts/Statemachine/ShaderStage.gd" id="3_qyd4u"]
[sub_resource type="Animation" id="Animation_qyd4u"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("texture:scale")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(1, 1)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("texture:material:shader_parameter/alpha")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [1.0]
}
[sub_resource type="Animation" id="Animation_oinqg"]
resource_name = "destroy"
length = 0.5
step = 0.1
[sub_resource type="Animation" id="Animation_ynxlt"]
resource_name = "loop"
loop_mode = 1
step = 0.1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:rotation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [0.0, 6.28319]
}
[sub_resource type="Animation" id="Animation_kmogx"]
resource_name = "spawn"
step = 0.05
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("texture:scale")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Vector2(0, 0), Vector2(1, 1)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("texture:material:shader_parameter/alpha")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.25, 0.6, 1),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 0,
"values": [0.0, 1.0, 1.0, 0.0]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_qyd4u"]
_data = {
&"RESET": SubResource("Animation_qyd4u"),
&"destroy": SubResource("Animation_oinqg"),
&"loop": SubResource("Animation_ynxlt"),
&"spawn": SubResource("Animation_kmogx")
}
[sub_resource type="ShaderMaterial" id="ShaderMaterial_qyd4u"]
shader = ExtResource("2_ddosv")
shader_parameter/inner = 0.7999999821184
shader_parameter/outer = 0.999999977648
shader_parameter/alpha = 1.0
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_ddosv"]
radius = 13.0
height = 138.0
[node name="DogCircle" instance=ExtResource("1_yfqj6")]
script = ExtResource("2_qyd4u")
displayName = "吼叫声波"
damage = 2.0
autoSpawnAnimation = true
freeAfterSpawn = true
[node name="animator" parent="texture" index="0"]
libraries = {
&"": SubResource("AnimationLibrary_qyd4u")
}
[node name="texture" type="Node2D" parent="texture" index="1"]
modulate = Color(1, 1, 1, 0.08421052)
material = SubResource("ShaderMaterial_qyd4u")
script = ExtResource("3_qyd4u")
size = Vector2(40, 150)
color = Color(1, 1, 1, 0)
metadata/_custom_type_script = "uid://cgb01lelfg73p"
[node name="hitbox" parent="." index="1"]
shape = SubResource("CapsuleShape2D_ddosv")
+1
View File
@@ -28,6 +28,7 @@ radius = 19.026299
[node name="Cat" instance=ExtResource("1_hw4g4")]
script = ExtResource("2_uo67a")
displayName = "猫"
[node name="hurt" parent="sounds" index="3"]
stream = ExtResource("3_2o6vq")
+47
View File
@@ -0,0 +1,47 @@
[gd_scene load_steps=6 format=3 uid="uid://bb363wvwvs7m4"]
[ext_resource type="PackedScene" uid="uid://cvogxi7mktumf" path="res://components/Abstracts/EntityBase.tscn" id="1_cbgnh"]
[ext_resource type="Texture2D" uid="uid://cew1kecisufy4" path="res://resources/characters/dog/hsq.png" id="2_oospf"]
[ext_resource type="Script" uid="uid://soehdxfbpmc0" path="res://scripts/Contents/Characters/Dog.gd" id="2_pb36u"]
[sub_resource type="SpriteFrames" id="SpriteFrames_pb36u"]
animations = [{
"frames": [],
"loop": true,
"name": &"idle",
"speed": 5.0
}, {
"frames": [],
"loop": true,
"name": &"walk",
"speed": 5.0
}]
[sub_resource type="SpriteFrames" id="SpriteFrames_tn3v8"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("2_oospf")
}],
"loop": true,
"name": &"idle",
"speed": 5.0
}]
[node name="Dog" instance=ExtResource("1_cbgnh")]
script = ExtResource("2_pb36u")
displayName = "哈士奇"
[node name="texture" parent="." index="3"]
sprite_frames = SubResource("SpriteFrames_pb36u")
[node name="staticAnimation" parent="texture" index="1"]
position = Vector2(0, -19.999998)
scale = Vector2(0.35093215, 0.35093215)
sprite_frames = SubResource("SpriteFrames_tn3v8")
animation = &"idle"
[node name="normal" type="Node2D" parent="texture/weapons" index="0"]
[node name="statebar" parent="." index="4"]
position = Vector2(0, -150)
+38
View File
@@ -0,0 +1,38 @@
[gd_scene load_steps=8 format=3 uid="uid://cg8fj1d62w5uk"]
[ext_resource type="PackedScene" uid="uid://bcvuuy2m0pke0" path="res://components/Abstracts/EffectBase.tscn" id="1_tppsq"]
[ext_resource type="Texture2D" uid="uid://cli8w23q0k1dl" path="res://resources/effects/feather.png" id="2_k2423"]
[sub_resource type="Curve" id="Curve_lwtk5"]
_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_suj3b"]
curve = SubResource("Curve_lwtk5")
[sub_resource type="Curve" id="Curve_k2423"]
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0.7), 0.0, 0.0, 0, 0]
point_count = 2
[sub_resource type="CurveTexture" id="CurveTexture_lwtk5"]
curve = SubResource("Curve_k2423")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_kg7ml"]
particle_flag_disable_z = true
angle_min = 1.0728835e-05
angle_max = 45.00001
angle_curve = SubResource("CurveTexture_lwtk5")
spread = 180.0
initial_velocity_min = 20.0
initial_velocity_max = 40.0
gravity = Vector3(0, 0, 0)
scale_min = 0.099999994
scale_max = 0.14999999
alpha_curve = SubResource("CurveTexture_suj3b")
[node name="FeatherFall" instance=ExtResource("1_tppsq")]
[node name="particles" parent="." index="1"]
amount = 2
texture = ExtResource("2_k2423")
process_material = SubResource("ParticleProcessMaterial_kg7ml")