fix(boss): 防玩家死亡致命一击重入 —— EnemyBulletManager._swap_and_pop 负数守卫 + BossManager 循环内失效键跳过
This commit is contained in:
@@ -37,6 +37,8 @@ func _physics_process(delta: float) -> void:
|
||||
i += 1
|
||||
|
||||
func _swap_and_pop(idx: int) -> void:
|
||||
if _active_count <= 0:
|
||||
return # 防重入:玩家死亡致命一击触发 reset() 已清空池,勿再 -1
|
||||
var last: int = _active_count - 1
|
||||
if idx != last:
|
||||
var b_i: int = idx * ENEMY_BULLET_STRIDE
|
||||
|
||||
Reference in New Issue
Block a user