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

feat(子弹): 为InfinitySword添加击中特效

在击中实体时创建血溅效果并隐藏粒子,同时修复ShootBlood场景的格式问题
This commit is contained in:
2026-04-03 19:37:51 +08:00
parent 473f16b5d6
commit 928050ef88
2 changed files with 5 additions and 2 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=10 format=3 uid="uid://mtenc2b01vau"]
[gd_scene format=3 uid="uid://mtenc2b01vau"]
[ext_resource type="PackedScene" uid="uid://bcvuuy2m0pke0" path="res://components/Abstracts/EffectBase.tscn" id="1_yjqwo"]
[ext_resource type="AudioStream" uid="uid://23ttwefh4ej2" path="res://resources/sounds/effect/arrowshot.mp3" id="2_joko4"]
@@ -36,7 +36,7 @@ color = Color(1, 0, 0, 1)
color_initial_ramp = SubResource("GradientTexture1D_joko4")
alpha_curve = SubResource("CurveTexture_joko4")
[node name="ShootBlood" instance=ExtResource("1_yjqwo")]
[node name="ShootBlood" unique_id=1999496041 instance=ExtResource("1_yjqwo")]
spawnSound = "spawn"
[node name="spawn" parent="sounds" index="0"]
@@ -10,3 +10,6 @@ func succeedToHit(_dmg: float, entity: EntityBase):
else:
implused.append(entity)
entity.impluse(Vector2.from_angle(rotation) * 1500)
var eff = EffectController.create(ComponentManager.getEffect("ShootBlood"), entity.position)
eff.particles.hide()
eff.shot()