From 061f3022b336abc7d3e697694c32cb4bd9d79ac8 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, 26 Sep 2025 22:19:16 +0800 Subject: [PATCH] =?UTF-8?q?refactor(Bullets):=20=E7=A7=BB=E9=99=A4SevenSou?= =?UTF-8?q?l=E5=AD=90=E5=BC=B9=E7=9A=84spawnedChild=E5=8F=98=E9=87=8F?= =?UTF-8?q?=E5=8F=8A=E7=9B=B8=E5=85=B3=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 简化子弹生成逻辑,移除不再需要的状态变量和循环生成子子弹的代码 --- scripts/Contents/Bullets/SevenSoul.gd | 7 ------- 1 file changed, 7 deletions(-) diff --git a/scripts/Contents/Bullets/SevenSoul.gd b/scripts/Contents/Bullets/SevenSoul.gd index 9cb7c21..89deab5 100644 --- a/scripts/Contents/Bullets/SevenSoul.gd +++ b/scripts/Contents/Bullets/SevenSoul.gd @@ -9,7 +9,6 @@ var colors = [ "#FDEB0F" ] var index = 0 -var spawnedChild = false @onready var heart = $"%heart" @onready var effect: GPUParticles2D = $"%effect" @@ -24,12 +23,6 @@ func ai(): PresetBulletAI.lockLauncher(self, launcher, true) func applyDot(): if timeLived() > 20000 * ((6.0 - index) / 6.0): - if !spawnedChild: - spawnedChild = true - var count = 7 - for i in count: - BulletBase.generate(ComponentManager.getBullet("WhiteSoul"), launcher, heart.global_position, rotation + deg_to_rad(360.0 / count * i)) - await TickTool.millseconds(50) BulletBase.generate(ComponentManager.getBullet("SoulBall"), launcher, heart.global_position, heart.global_position.angle_to_point(get_global_mouse_position())) await TickTool.millseconds(100) return true