From 928050ef88b6fcf1cb3c9de943374da31386045b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=A8=E8=90=BD=E5=9F=BA=E5=9B=B4=E8=99=BE?= <3161880837@qq.com> Date: Fri, 3 Apr 2026 19:37:51 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E5=AD=90=E5=BC=B9):=20=E4=B8=BAInfinitySw?= =?UTF-8?q?ord=E6=B7=BB=E5=8A=A0=E5=87=BB=E4=B8=AD=E7=89=B9=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在击中实体时创建血溅效果并隐藏粒子,同时修复ShootBlood场景的格式问题 --- components/Effects/ShootBlood.tscn | 4 ++-- scripts/Contents/Bullets/InfinitySword.gd | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/components/Effects/ShootBlood.tscn b/components/Effects/ShootBlood.tscn index f20a363..4e9624f 100644 --- a/components/Effects/ShootBlood.tscn +++ b/components/Effects/ShootBlood.tscn @@ -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"] diff --git a/scripts/Contents/Bullets/InfinitySword.gd b/scripts/Contents/Bullets/InfinitySword.gd index 7b0cde0..3f87338 100644 --- a/scripts/Contents/Bullets/InfinitySword.gd +++ b/scripts/Contents/Bullets/InfinitySword.gd @@ -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()