From f7861a26c49be7f0dc034b383bf775fa755ecc28 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: Sun, 10 May 2026 14:58:31 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BF=AE=E6=94=B9=E5=AD=90?= =?UTF-8?q?=E5=BC=B9=E5=AE=9E=E4=BE=8B=E6=B7=BB=E5=8A=A0=E5=88=B0=E5=9C=BA?= =?UTF-8?q?=E6=99=AF=E7=9A=84=E6=96=B9=E6=B3=95=E8=B0=83=E7=94=A8=E6=96=B9?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将直接调用call_deferred改为通过add_child属性调用,保持代码风格一致 --- scripts/Statemachine/BulletBase.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Statemachine/BulletBase.gd b/scripts/Statemachine/BulletBase.gd index cb04c9b..f437b88 100644 --- a/scripts/Statemachine/BulletBase.gd +++ b/scripts/Statemachine/BulletBase.gd @@ -277,7 +277,7 @@ static func generate( instance.position = spawnPosition instance.rotation = spawnRotation + deg_to_rad(launchBy.fields.get(FieldStore.Entity.OFFSET_SHOOT) * randf_range(-1, 1) * int(!ignoreOffset)) if addToWorld: - WorldManager.rootNode.call_deferred("add_child", instance) + WorldManager.rootNode.add_child.call_deferred(instance) instance.add_to_group("bullets") instances.append(instance) return instances