1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 15:01:53 +08:00

refactor(Wave): 重构波次配置逻辑以提升可维护性

将硬编码的测试模式配置提取为 waveConfig 数组,便于统一管理
修复 Parrier.gd 中子弹伤害计算变量名不一致的问题
This commit is contained in:
2026-03-28 10:45:46 +08:00
parent cedb79faf3
commit 826df79c45
2 changed files with 6 additions and 3 deletions
+2 -1
View File
@@ -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):
+4 -2
View File
@@ -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,