1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-27 22:41:56 +08:00

feat(角色): 调整Rooster受伤时的羽毛掉落效果

- 为Rooster添加受伤时的羽毛掉落特效
- 调整FeatherFall粒子效果参数,包括速度、重力和大小
- 修改DogCircle子弹的初始状态和动画时间
- 调整Dog武器节点的位置
- 为EntityBase的受伤方法添加注释
This commit is contained in:
2025-11-16 14:32:33 +08:00
parent 5425e95c2f
commit 9e77b720d6
5 changed files with 19 additions and 10 deletions
+5 -4
View File
@@ -17,7 +17,7 @@ tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(1, 1)]
"values": [Vector2(0, 0)]
}
tracks/1/type = "value"
tracks/1/imported = false
@@ -29,7 +29,7 @@ tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [1.0]
"values": [0.0]
}
[sub_resource type="Animation" id="Animation_oinqg"]
@@ -76,7 +76,7 @@ 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),
"times": PackedFloat32Array(0, 0.1, 0.6, 1),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 0,
"values": [0.0, 1.0, 1.0, 0.0]
@@ -94,7 +94,7 @@ _data = {
shader = ExtResource("2_ddosv")
shader_parameter/inner = 0.7999999821184
shader_parameter/outer = 0.999999977648
shader_parameter/alpha = 1.0
shader_parameter/alpha = 0.0
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_ddosv"]
radius = 13.0
@@ -115,6 +115,7 @@ libraries = {
[node name="texture" type="Node2D" parent="texture" index="1"]
modulate = Color(1, 1, 1, 0.08421052)
material = SubResource("ShaderMaterial_qyd4u")
scale = Vector2(1e-05, 1e-05)
script = ExtResource("3_qyd4u")
size = Vector2(40, 150)
color = Color(1, 1, 1, 0)
+1
View File
@@ -42,6 +42,7 @@ sprite_frames = SubResource("SpriteFrames_tn3v8")
animation = &"idle"
[node name="normal" type="Node2D" parent="texture/weapons" index="0"]
position = Vector2(53, -35)
[node name="statebar" parent="." index="4"]
position = Vector2(0, -150)
+8 -6
View File
@@ -19,20 +19,22 @@ curve = SubResource("Curve_k2423")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_kg7ml"]
particle_flag_disable_z = true
emission_shape = 1
emission_sphere_radius = 50.0
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
initial_velocity_min = 50.0
initial_velocity_max = 100.0
gravity = Vector3(0, 98, 0)
scale_min = 0.06
scale_max = 0.099999994
alpha_curve = SubResource("CurveTexture_suj3b")
[node name="FeatherFall" instance=ExtResource("1_tppsq")]
[node name="particles" parent="." index="1"]
amount = 2
amount = 1
texture = ExtResource("2_k2423")
process_material = SubResource("ParticleProcessMaterial_kg7ml")
+4
View File
@@ -4,6 +4,10 @@ class_name Rooster
func register():
attackCooldownMap[0] = 200
attackCooldownMap[1] = 6000
hit.connect(
func(_damage: float, _bullet: BulletBase, _crit: bool):
EffectController.create(ComponentManager.getEffect("FeatherFall"), texture.global_position).shot()
)
func ai():
texture.play("walk")
var direction = Vector2(
+1
View File
@@ -224,6 +224,7 @@ func getSprintInitialDisplace():
func getSprintProgress():
return velocity.length() / getSprintInitialDisplace().length()
func takeDamage(bullet: BulletBase, crit: bool):
# 当受伤时
hurtAnimator.play("hurt")
var baseDamage: float = bullet.damage * bullet.launcher.fields.get(FieldStore.Entity.DAMAGE_MULTIPILER) * randf_range(1 - GameRule.damageOffset, 1 + GameRule.damageOffset)
var damage = baseDamage + baseDamage * int(crit) * fields.get(FieldStore.Entity.CRIT_DAMAGE)