From 4026caf0de8467924612046542fee67d5774aa25 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: Tue, 12 May 2026 06:46:33 +0800 Subject: [PATCH] =?UTF-8?q?refactor(bullet):=20=E4=BF=AE=E5=A4=8D=E5=AD=90?= =?UTF-8?q?=E5=BC=B9=E5=88=87=E5=89=B2=E6=97=B6=E7=9A=84=E9=80=9F=E5=BA=A6?= =?UTF-8?q?=E7=BC=A9=E6=94=BE=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 修正Volcano子弹动画速度计算改为直接修改animator.speed_scale 2. 调整Volcano子弹发射速度倍率从0.9倍改为原0.75倍 3. 优化Volcano子弹粒子发射速度从300改为150 4. 调整MuyangDog的fieldValues并添加点击重建属性 5. 修复Volcano动画轨迹的多余关键帧与modulate显示逻辑 --- components/Bullets/Volcano.tscn | 36 ++++++++++++++++++++---- components/CharacterCards/MuyangDog.tscn | 3 +- scripts/Contents/Bullets/Volcano.gd | 2 +- scripts/Statemachine/BulletBase.gd | 4 +-- 4 files changed, 35 insertions(+), 10 deletions(-) diff --git a/components/Bullets/Volcano.tscn b/components/Bullets/Volcano.tscn index ef18756..354b59b 100644 --- a/components/Bullets/Volcano.tscn +++ b/components/Bullets/Volcano.tscn @@ -115,6 +115,18 @@ tracks/8/keys = { "update": 1, "values": [false] } +tracks/9/type = "value" +tracks/9/imported = false +tracks/9/enabled = true +tracks/9/path = NodePath("%textureSword/trailLine:modulate") +tracks/9/interp = 1 +tracks/9/loop_wrap = true +tracks/9/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Color(1, 1, 1, 1)] +} [sub_resource type="Animation" id="Animation_oinqg"] resource_name = "destroy" @@ -133,7 +145,7 @@ tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { "handle_modes": PackedInt32Array(0, 0, 2), -"points": PackedFloat32Array(200, 0, 0, 0.25, 0, 500, -0.083333336, -8.333334, 0, 0, 200, 0, 0, 0, 0), +"points": PackedFloat32Array(200, 0, 0, 0.1, 0, 500, -0.2, 0, 0.02, 0, 200, -0.05, -100, 0, 0), "times": PackedFloat32Array(0, 0.2, 0.3) } tracks/1/type = "bezier" @@ -254,10 +266,10 @@ tracks/9/path = NodePath("anchor/textureSword/trailLine:visible") tracks/9/interp = 1 tracks/9/loop_wrap = true tracks/9/keys = { -"times": PackedFloat32Array(0, 0.15, 0.2, 1.65, 1.8), -"transitions": PackedFloat32Array(1, 1, 1, 1, 1), +"times": PackedFloat32Array(0, 0.15, 0.2, 1.65), +"transitions": PackedFloat32Array(1, 1, 1, 1), "update": 1, -"values": [false, true, false, true, false] +"values": [false, true, false, true] } tracks/10/type = "value" tracks/10/imported = false @@ -271,6 +283,18 @@ tracks/10/keys = { "update": 1, "values": [false, true, false] } +tracks/11/type = "value" +tracks/11/imported = false +tracks/11/enabled = true +tracks/11/path = NodePath("%textureSword/trailLine:modulate") +tracks/11/interp = 1 +tracks/11/loop_wrap = true +tracks/11/keys = { +"times": PackedFloat32Array(0, 1.8, 2), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 0, +"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 1), Color(1, 1, 1, 0)] +} [sub_resource type="AnimationLibrary" id="AnimationLibrary_w1utg"] _data = { @@ -319,8 +343,8 @@ alpha_curve = SubResource("CurveTexture_xrrxo") particle_flag_disable_z = true direction = Vector3(-1, 1, 0) spread = 0.0 -initial_velocity_min = 300.0 -initial_velocity_max = 300.0 +initial_velocity_min = 150.0 +initial_velocity_max = 150.0 gravity = Vector3(0, 0, 0) alpha_curve = SubResource("CurveTexture_b5nxd") diff --git a/components/CharacterCards/MuyangDog.tscn b/components/CharacterCards/MuyangDog.tscn index 83cac88..ee9a7e2 100644 --- a/components/CharacterCards/MuyangDog.tscn +++ b/components/CharacterCards/MuyangDog.tscn @@ -21,7 +21,8 @@ slogan = "恪守使命不离不弃" avatar = ExtResource("2_fi2nw") description = "每隔3秒发动格挡。" fields = Array[int]([0, 8, 3]) -fieldValues = Array[float]([100.0, 0.2, 0.0]) +fieldValues = Array[float]([100.0, 0.2, -0.45]) +clickToRebuild = true [node name="avatarTexture" parent="wrapper" parent_id_path=PackedInt32Array(2023039659) index="0" unique_id=1334645594] texture = ExtResource("2_fi2nw") diff --git a/scripts/Contents/Bullets/Volcano.gd b/scripts/Contents/Bullets/Volcano.gd index 2b8b8b8..162f085 100644 --- a/scripts/Contents/Bullets/Volcano.gd +++ b/scripts/Contents/Bullets/Volcano.gd @@ -10,7 +10,7 @@ var dmg5: float = 0 var splitAngle: float = 10 func spawn(): - animator.speed_scale = launcher.fields[FieldStore.Entity.ATTACK_SPEED] * 0.75 + animator.speed_scale = launcher.fields[FieldStore.Entity.ATTACK_SPEED] * (1.0 - 0.1) setupCuttable(0.2) func ai(): PresetBulletAI.lockLauncher(self , launcher, true) diff --git a/scripts/Statemachine/BulletBase.gd b/scripts/Statemachine/BulletBase.gd index fdeb8c1..3077131 100644 --- a/scripts/Statemachine/BulletBase.gd +++ b/scripts/Statemachine/BulletBase.gd @@ -131,13 +131,13 @@ func setupCuttable(cutSpeed: float): func(body): var entity = EntityTool.fromHurtbox(body) if entity: - speedScale *= cutSpeed + animator.speed_scale *= cutSpeed ) area_exited.connect( func(body): var entity = EntityTool.fromHurtbox(body) if entity: - speedScale /= cutSpeed + animator.speed_scale /= cutSpeed ) func getDamage(): return baseDamage * damageMultipliers[usingDamageMultiplier]