From 65ef6dd5bbb26f9b455c323da456d736df14643e 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: Sat, 6 Sep 2025 09:08:28 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=AD=A6=E5=99=A8):=20=E8=B0=83=E6=95=B4L?= =?UTF-8?q?GBT=E6=AD=A6=E5=99=A8=E5=86=B7=E5=8D=B4=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E5=B9=B6=E6=B7=BB=E5=8A=A0=E7=88=86=E7=82=B8=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将LGBT武器的冷却时间从2000ms减少到500ms - 移除子弹的固定伤害值,改为在销毁时创建爆炸效果 - 为爆炸效果添加粒子系统,包含彩虹渐变和随机方向 --- components/Effects/LGBTBoom.tscn | 51 +++++++++++++++++++++++++- components/Weapons/LGBT.tscn | 2 +- scripts/Contents/Bullets/LGBTBullet.gd | 3 +- 3 files changed, 53 insertions(+), 3 deletions(-) diff --git a/components/Effects/LGBTBoom.tscn b/components/Effects/LGBTBoom.tscn index 3c15d88..b23fae4 100644 --- a/components/Effects/LGBTBoom.tscn +++ b/components/Effects/LGBTBoom.tscn @@ -1,5 +1,54 @@ -[gd_scene load_steps=2 format=3 uid="uid://ddj4xiia81g28"] +[gd_scene load_steps=12 format=3 uid="uid://ddj4xiia81g28"] [ext_resource type="PackedScene" uid="uid://bcvuuy2m0pke0" path="res://components/Abstracts/EffectBase.tscn" id="1_qfayo"] +[ext_resource type="Texture2D" uid="uid://d2pndtow16635" path="res://resources/bullets/lgbt-bullet/造型2.svg" id="2_g6mna"] + +[sub_resource type="Curve" id="Curve_fauhw"] +_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_va8eb"] +curve = SubResource("Curve_fauhw") + +[sub_resource type="Curve" id="Curve_l2yd6"] +_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_i60ri"] +curve = SubResource("Curve_l2yd6") + +[sub_resource type="Gradient" id="Gradient_sfjew"] +offsets = PackedFloat32Array(0, 0.16, 0.32, 0.48, 0.64, 0.8, 1) +colors = PackedColorArray(1, 0, 0, 1, 1, 0.447059, 0, 1, 1, 0.890625, 0, 1, 0, 0.820313, 0.128174, 1, 0, 1, 0.859375, 1, 0, 0.53125, 1, 1, 0.429688, 0, 1, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_lbwsr"] +gradient = SubResource("Gradient_sfjew") + +[sub_resource type="Curve" id="Curve_g4ke1"] +_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_cgdl1"] +curve = SubResource("Curve_g4ke1") + +[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_ynlvg"] +particle_flag_disable_z = true +angle_min = 1.07288e-05 +angle_max = 360.0 +angle_curve = SubResource("CurveTexture_i60ri") +direction = Vector3(-1, 0, 0) +spread = 180.0 +initial_velocity_min = 25.0 +initial_velocity_max = 50.0 +gravity = Vector3(0, 0, 0) +scale_min = 0.5 +scale_curve = SubResource("CurveTexture_cgdl1") +color_ramp = SubResource("GradientTexture1D_lbwsr") +alpha_curve = SubResource("CurveTexture_va8eb") [node name="LGBTBoom" instance=ExtResource("1_qfayo")] + +[node name="particles" parent="." index="1"] +amount = 10 +process_material = SubResource("ParticleProcessMaterial_ynlvg") +texture = ExtResource("2_g6mna") diff --git a/components/Weapons/LGBT.tscn b/components/Weapons/LGBT.tscn index 524507e..3730a01 100644 --- a/components/Weapons/LGBT.tscn +++ b/components/Weapons/LGBT.tscn @@ -22,7 +22,7 @@ store = { storeType = Array[int]([2, 0, 0, 1, 0]) descriptionTemplate = "发射$count条,每条间分隔$angle,可追踪$trace秒,效率为$power的带状彩虹,每条造成$atk点伤害。" needEnergy = 10.0 -cooldown = 2000.0 +cooldown = 500.0 [node name="avatar" parent="container/info" index="0"] texture = ExtResource("2_ou6jo") diff --git a/scripts/Contents/Bullets/LGBTBullet.gd b/scripts/Contents/Bullets/LGBTBullet.gd index 834d2e4..994a121 100644 --- a/scripts/Contents/Bullets/LGBTBullet.gd +++ b/scripts/Contents/Bullets/LGBTBullet.gd @@ -7,7 +7,6 @@ var tracePower: float func register(): speed = 1 - damage = 5 func ai(): texture.rotation_degrees += speed speed *= 1.05 @@ -15,3 +14,5 @@ func ai(): if is_instance_valid(tracer) and timeLived() < maxTraceTime: PresetAIs.trace(self, tracer.position, clamp(speed / 50 * tracePower, 0, 1)) PresetAIs.forward(self, rotation) +func destroy(_b): + EffectController.create(preload("res://components/Effects/LGBTBoom.tscn"), position).shot()