From 826df79c45554e8fe65602fad41a87f3f6a68e99 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: Sat, 28 Mar 2026 10:45:46 +0800 Subject: [PATCH] =?UTF-8?q?refactor(Wave):=20=E9=87=8D=E6=9E=84=E6=B3=A2?= =?UTF-8?q?=E6=AC=A1=E9=85=8D=E7=BD=AE=E9=80=BB=E8=BE=91=E4=BB=A5=E6=8F=90?= =?UTF-8?q?=E5=8D=87=E5=8F=AF=E7=BB=B4=E6=8A=A4=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将硬编码的测试模式配置提取为 waveConfig 数组,便于统一管理 修复 Parrier.gd 中子弹伤害计算变量名不一致的问题 --- scripts/Contents/Bullets/Parrier.gd | 3 ++- scripts/Contents/Wave.gd | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/Contents/Bullets/Parrier.gd b/scripts/Contents/Bullets/Parrier.gd index 6ffcac9..1683d24 100644 --- a/scripts/Contents/Bullets/Parrier.gd +++ b/scripts/Contents/Bullets/Parrier.gd @@ -31,6 +31,7 @@ func hitBullet(bullet: BulletBase): # 当前子弹与其他子弹相撞 eff.shot() CameraManager.shake(250, 300) launcher.impluse((position - bullet.position).normalized() * (bullet.speed * bullet.getDamage()) ** (1.0 / 3) * 250) + var targetBaseDamage = bullet.baseDamage # 弹反 还是 格挡? if MathTool.rate(reflectRate): bullet.look_at(bullet.launcher.position) @@ -49,7 +50,7 @@ func hitBullet(bullet: BulletBase): # 当前子弹与其他子弹相撞 0 ): if b is ParryBallBullet: - b.atk = atk * bullet.baseDamage + b.atk = atk * targetBaseDamage func refract(_newBullet: BulletBase, _entity: EntityBase, _index: int, _total: int, _lastBullet: float): return null func split(_newBullet: BulletBase, _index: int, _total: int, _lastBullet: float): diff --git a/scripts/Contents/Wave.gd b/scripts/Contents/Wave.gd index b770534..0f46de1 100644 --- a/scripts/Contents/Wave.gd +++ b/scripts/Contents/Wave.gd @@ -49,8 +49,10 @@ static var WAVE_JUSTJOKE = [ Wave.create("Kernyr", 0, 0, true, 0, INF, 1), ] static var WAVE_EMPTY = [] -static var current: int = startWith(1) if WorldManager.isRelease() else startWith(10) -static var data = WAVE_NORMAL if WorldManager.isRelease() else WAVE_JUSTJOKE +static var waveConfig = [WAVE_JUSTJOKE, 10] + +static var current: int = startWith(1) if WorldManager.isRelease() else startWith(waveConfig[1]) +static var data = WAVE_NORMAL if WorldManager.isRelease() else waveConfig[0] static func create( entity_: String,