From 65d31940deab3c2bcdc17f262fedacab82270268 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:29:28 +0800 Subject: [PATCH] =?UTF-8?q?perf(Weapons/SevenSoul):=20=E5=87=8F=E5=B0=91?= =?UTF-8?q?=E4=B8=83=E9=AD=82=E6=AD=A6=E5=99=A8=E7=9A=84=E6=94=BB=E5=87=BB?= =?UTF-8?q?=E9=97=B4=E9=9A=94=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将七魂武器的攻击间隔从19500毫秒减少到15000毫秒,并添加5000毫秒的生成后延迟,以提升攻击流畅度和游戏体验 --- scripts/Contents/Bullets/SevenSoul.gd | 5 +++-- scripts/Contents/Weapons/SevenSoul.gd | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/Contents/Bullets/SevenSoul.gd b/scripts/Contents/Bullets/SevenSoul.gd index 1b240fe..ef6b9c0 100644 --- a/scripts/Contents/Bullets/SevenSoul.gd +++ b/scripts/Contents/Bullets/SevenSoul.gd @@ -9,7 +9,8 @@ var colors = [ "#FDEB0F" ] var index = 0 -var generationDuration: float = 19500 +var generationDuration: float = 15000 +var pingAfterGeneration: float = 5000 @onready var heart = $"%heart" @onready var effect: GPUParticles2D = $"%effect" @@ -24,7 +25,7 @@ func ai(): heart.global_rotation_degrees = 0 PresetBulletAI.lockLauncher(self, launcher, true) func applyDot(): - if timeLived() > generationDuration * ((6.0 - index) / 6.0): + if timeLived() > generationDuration * ((6.0 - index) / 6.0) + pingAfterGeneration: 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 diff --git a/scripts/Contents/Weapons/SevenSoul.gd b/scripts/Contents/Weapons/SevenSoul.gd index 742ce3d..c5e9c54 100644 --- a/scripts/Contents/Weapons/SevenSoul.gd +++ b/scripts/Contents/Weapons/SevenSoul.gd @@ -6,7 +6,7 @@ func attack(entity: EntityBase): for i in 6: for j in BulletBase.generate(ComponentManager.getBullet("SevenSoul"), entity, entity.texture.global_position, 0): j.index = i - await TickTool.millseconds(19500 / 6.0) + await TickTool.millseconds(15000 / 6.0) func update(to, origin, _entity): origin["atk"] += 1 * to * soulLevel return origin