fix(player): 补挂 CheckpointRespawnHandler——存活回检查点链路接通

PlacePlayer 脚手架新增 CheckpointRespawnHandler 并自动绑定
EVT_CheckpointRespawn/EVT_FadeOutRequest/EVT_FadeInRequest;
Player.prefab 同步补挂修正。此前 LethalTrap 存活路径 Raise 的
EVT_CheckpointRespawn 无任何监听者,玩家不会被传送回检查点。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-06-12 11:04:33 +08:00
parent 862a1e5899
commit 64822595b3
2 changed files with 24 additions and 2 deletions

View File

@@ -232,6 +232,13 @@ namespace BaseGames.Editor
if (inputReader != null)
AssignReference(interactDetector, "_inputReader", inputReader, report);
// ── 检查点回溯LethalTrap 存活路径:淡出 → 传送至最近检查点 → 淡入)──
// 须与 Rigidbody2D 同节点(传送时直接写 rb.position
CheckpointRespawnHandler checkpointRespawn = GetOrAddComponent<CheckpointRespawnHandler>(root);
AssignAsset(checkpointRespawn, "_onCheckpointRespawn", report, false, "EVT_CheckpointRespawn");
AssignAsset(checkpointRespawn, "_onFadeOutRequest", report, false, "EVT_FadeOutRequest");
AssignAsset(checkpointRespawn, "_onFadeInRequest", report, false, "EVT_FadeInRequest");
if (animConfig == null) report.Add("★ 需创建并绑定PlayerController._animConfigPLY_PlayerAnimationConfig");
if (statsConfig == null) report.Add("★ 需创建并绑定PlayerStats._configPlayerStatsSO");
if (inputReader == null) report.Add("★ 需手动绑定PlayerController._inputReader / FormController._input / SkillManager._inputInputReaderSO");