From 53d1be67495c3919833dfc8ae0931555bb218ce2 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: Mon, 11 May 2026 22:11:31 +0800 Subject: [PATCH] =?UTF-8?q?refactor(Volcano=20bullet):=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E7=81=AB=E5=B1=B1=E5=BC=B9=E7=9B=B8=E5=85=B3=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 新增spawn方法并设置可切割属性 2. 调整命中时的冲量大小从500改为400 3. 为动画添加hitbox显隐切换轨道 --- components/Bullets/Volcano.tscn | 24 ++++++++++++++++++++++++ scripts/Contents/Bullets/Volcano.gd | 4 +++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/components/Bullets/Volcano.tscn b/components/Bullets/Volcano.tscn index c8e6256..f6caf80 100644 --- a/components/Bullets/Volcano.tscn +++ b/components/Bullets/Volcano.tscn @@ -67,6 +67,18 @@ tracks/4/keys = { "update": 1, "values": [0] } +tracks/5/type = "value" +tracks/5/imported = false +tracks/5/enabled = true +tracks/5/path = NodePath("%hitbox:disabled") +tracks/5/interp = 1 +tracks/5/loop_wrap = true +tracks/5/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [false] +} [sub_resource type="Animation" id="Animation_oinqg"] resource_name = "destroy" @@ -175,6 +187,18 @@ tracks/6/keys = { "update": 1, "values": [6, 0, 6] } +tracks/7/type = "value" +tracks/7/imported = false +tracks/7/enabled = true +tracks/7/path = NodePath("%hitbox:disabled") +tracks/7/interp = 1 +tracks/7/loop_wrap = true +tracks/7/keys = { +"times": PackedFloat32Array(0, 0.05, 0.2, 0.7, 0.9, 1.2, 1.35, 1.65, 1.8), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1), +"update": 1, +"values": [true, false, true, false, true, false, true, false, true] +} [sub_resource type="AnimationLibrary" id="AnimationLibrary_w1utg"] _data = { diff --git a/scripts/Contents/Bullets/Volcano.gd b/scripts/Contents/Bullets/Volcano.gd index 3a49bf2..8ff8462 100644 --- a/scripts/Contents/Bullets/Volcano.gd +++ b/scripts/Contents/Bullets/Volcano.gd @@ -9,6 +9,8 @@ var count: int = 0 var dmg5: float = 0 var splitAngle: float = 10 +func spawn(): + setupCuttable(0.2) func ai(): PresetBulletAI.lockLauncher(self , launcher, true) rotation = lerp_angle( @@ -17,7 +19,7 @@ func ai(): rotates ) func succeedToHit(_dmg: float, entity: EntityBase): - entity.impluse((entity.getTrackingAnchor() - position).normalized() * 500) + entity.impluse((entity.getTrackingAnchor() - position).normalized() * 400) ParryEntityEffect.createEffectEntity(entity, self ) func generateShadow():