From 6f19a6ba8e86131c6dbb9396000f7beaca2dbebc 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: Thu, 18 Sep 2025 22:13:10 +0800 Subject: [PATCH] =?UTF-8?q?fix(BossAttack):=20=E8=B0=83=E6=95=B4=E9=87=8D?= =?UTF-8?q?=E5=9E=8B=E7=B4=AB=E6=B0=B4=E6=99=B6=E5=AD=90=E5=BC=B9=E8=A1=8C?= =?UTF-8?q?=E4=B8=BA=E5=92=8C=E7=B2=92=E5=AD=90=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改子弹初始速度和加速度方向,移除无用粒子效果代码 调整粒子系统参数并增加粒子数量,优化视觉效果 修复碰撞检测逻辑,确保仅在激活时造成伤害 --- .../BossAttack/KukeMC/HeavyCrystal.tscn | 43 ++++++++++++++++--- .../Bullets/BossAttack/KukeMC/HeavyCrystal.gd | 11 +++-- 2 files changed, 41 insertions(+), 13 deletions(-) diff --git a/components/Bullets/BossAttack/KukeMC/HeavyCrystal.tscn b/components/Bullets/BossAttack/KukeMC/HeavyCrystal.tscn index 58d4413..0f06f30 100644 --- a/components/Bullets/BossAttack/KukeMC/HeavyCrystal.tscn +++ b/components/Bullets/BossAttack/KukeMC/HeavyCrystal.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=14 format=3 uid="uid://dxd6ikymj0fge"] +[gd_scene load_steps=20 format=3 uid="uid://dxd6ikymj0fge"] [ext_resource type="PackedScene" uid="uid://crtdkysmnkith" path="res://components/Abstracts/BulletBase.tscn" id="1_mf7ha"] [ext_resource type="Script" path="res://scripts/Statemachine/ShaderStage.gd" id="2_75div"] @@ -109,13 +109,42 @@ point_count = 2 [sub_resource type="CurveTexture" id="CurveTexture_inkfe"] curve = SubResource("Curve_g11yl") +[sub_resource type="Curve" id="Curve_gqowe"] +_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_0a8st"] +curve = SubResource("Curve_gqowe") + +[sub_resource type="Gradient" id="Gradient_52a6a"] +colors = PackedColorArray(0.834758, 0.605604, 0.893714, 1, 0.356599, 0.140737, 0.496047, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_uys4r"] +gradient = SubResource("Gradient_52a6a") + +[sub_resource type="Curve" id="Curve_cy4lq"] +_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_4rtxr"] +curve = SubResource("Curve_cy4lq") + [sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_hgwnm"] particle_flag_disable_z = true +emission_shape = 1 +emission_sphere_radius = 10.0 +angle_min = 1.07288e-05 +angle_max = 360.0 +angle_curve = SubResource("CurveTexture_0a8st") direction = Vector3(-1, 0, 0) spread = 0.0 -initial_velocity_min = 300.0 -initial_velocity_max = 300.0 +initial_velocity_min = 200.0 +initial_velocity_max = 400.0 gravity = Vector3(0, 0, 0) +scale_min = 3.0 +scale_max = 6.0 +scale_curve = SubResource("CurveTexture_4rtxr") +color_initial_ramp = SubResource("GradientTexture1D_uys4r") alpha_curve = SubResource("CurveTexture_inkfe") [node name="HeavyCrystal" instance=ExtResource("1_mf7ha")] @@ -124,7 +153,7 @@ scale = Vector2(2, 2) script = ExtResource("2_ygemv") displayName = "重型紫水晶" speed = 0.0 -damage = 20.0 +damage = 40.0 lifeTime = 2000.0 autoSpawnAnimation = true @@ -133,7 +162,7 @@ unique_name_in_owner = true material = SubResource("ShaderMaterial_1i43q") script = ExtResource("2_75div") size = Vector2(300, 300) -color = Color(0.451438, 0.278306, 1.44392e-07, 1) +color = Color(0.869998, 0.686414, 0.917359, 1) [node name="texture" parent="." index="1"] position = Vector2(145, 0) @@ -148,9 +177,9 @@ libraries = { [node name="trail" type="GPUParticles2D" parent="texture" index="1"] unique_name_in_owner = true z_index = -1 -amount = 10 +position = Vector2(10.6667, 0) +amount = 400 process_material = SubResource("ParticleProcessMaterial_hgwnm") -texture = ExtResource("2_ghoc2") local_coords = true [node name="hitbox" parent="." index="2"] diff --git a/scripts/Contents/Bullets/BossAttack/KukeMC/HeavyCrystal.gd b/scripts/Contents/Bullets/BossAttack/KukeMC/HeavyCrystal.gd index f5396a0..afc8a7c 100644 --- a/scripts/Contents/Bullets/BossAttack/KukeMC/HeavyCrystal.gd +++ b/scripts/Contents/Bullets/BossAttack/KukeMC/HeavyCrystal.gd @@ -1,20 +1,19 @@ extends BulletBase -@onready var trail: GPUParticles2D = $"%trail" @onready var track: Node2D = $"%track" var readyTime: float = 1000 func register(): - speed = -10 -func spawn(): - trail.emitting = false + speed = 10 func ai(): if timeLived() < readyTime: PresetBulletAI.lockLauncher(self, launcher, true) rotation = launcher.position.angle_to_point(launcher.currentFocusedBoss.position) + hitbox.disabled = true else: + damage = speed / 4 PresetBulletAI.forward(self, rotation) - speed += 2 - trail.emitting = true + speed *= 1.2 track.visible = false + hitbox.disabled = false