v11 全量评审:修复 TD-13 至 TD-17

- TD-13: IQuestManager.CompleteQuest 改用 IRewardTarget,移除 using BaseGames.Player
- TD-14: HurtFlashController 缓存 WaitForSeconds(_waitForFlash 字段)
- TD-16: LiquidType 枚举迁移至 BaseGames.Core.Events;LiquidEvent.LiquidType 改为枚举直接比较
- TD-17: DeathScreenController 移除失效的 _onPlayerDied 订阅,改为 OnEnable 直接启动延迟显示

影响文件: IQuestManager.cs / HurtFlashController.cs / LiquidType.cs(迁移) /
  LiquidEvent.cs / LiquidZone.cs / WaterDangerState.cs /
  UnderwaterPostProcessingController.cs / UnderwaterAudioController.cs /
  DeathScreenController.cs

评审文档: Docs/Review/FrameworkReview_2026_May_v11.md(综合评分 9.30/10)
This commit is contained in:
2026-05-12 16:34:03 +08:00
parent 9284278578
commit 1135139bc6
12 changed files with 554 additions and 32 deletions

View File

@@ -20,6 +20,7 @@ namespace BaseGames.VFX
private MaterialPropertyBlock _block;
private Coroutine _flashCoroutine;
private WaitForSeconds _waitForFlash;
private void Awake()
{
@@ -27,6 +28,8 @@ namespace BaseGames.VFX
if (_renderer == null)
_renderer = GetComponent<SpriteRenderer>();
_block = new MaterialPropertyBlock();
if (_config != null)
_waitForFlash = new WaitForSeconds(_config.HurtFlashDuration);
}
/// <summary>触发一次闪白动画。若上一次闪白未结束则重置计时器。</summary>
@@ -40,7 +43,7 @@ namespace BaseGames.VFX
private IEnumerator FlashCoroutine()
{
SetFlash(1f);
yield return new WaitForSeconds(_config.HurtFlashDuration);
yield return _waitForFlash ?? new WaitForSeconds(_config.HurtFlashDuration);
SetFlash(0f);
_flashCoroutine = null;
}