diff --git a/scenes/main/combat_s2.gd b/scenes/main/combat_s2.gd index 086ac62..8c74630 100644 --- a/scenes/main/combat_s2.gd +++ b/scenes/main/combat_s2.gd @@ -102,6 +102,13 @@ func _process(delta: float) -> void: _dps_poll_timer = 0.5 if _lbl_dps: _lbl_dps.text = tr("UI_DPS") % DpsTracker.get_dps() + # 无敌帧闪烁反馈:8Hz 方波(相位来自系统时钟,避免累加状态) + if _player_node: + if PlayerStats.is_invulnerable(): + var on: bool = (Time.get_ticks_msec() / 62) % 2 == 0 # ≈8Hz(62ms 半周期) + _player_node.modulate.a = 1.0 if on else 0.35 + elif _player_node.modulate.a != 1.0: + _player_node.modulate.a = 1.0 # 窗口结束确保恢复不透明 # ── 初始化 ─────────────────────────────────────────────────