From f204b919ffb0766d3caff5fd5ca33ee8451fba14 Mon Sep 17 00:00:00 2001 From: Joywayer Date: Fri, 24 Jul 2026 09:23:01 +0800 Subject: [PATCH] =?UTF-8?q?feat(iframe):=20=E6=97=A0=E6=95=8C=E6=9C=9F?= =?UTF-8?q?=E9=97=B4=E7=8E=A9=E5=AE=B6=E8=8A=82=E7=82=B9=208Hz=20=E6=96=B9?= =?UTF-8?q?=E6=B3=A2=E9=97=AA=E7=83=81=E5=8F=8D=E9=A6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- scenes/main/combat_s2.gd | 7 +++++++ 1 file changed, 7 insertions(+) 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 # 窗口结束确保恢复不透明 # ── 初始化 ─────────────────────────────────────────────────