feat(world): 检查点复活位置由 RespawnPoint 子节点显式配置

CheckpointMarker 新增 _respawnPoint 引用,注册的检查点位置改为
该子节点的位置——触发区与出生点解耦,触发区可横跨通道、出生点
精确落在安全平台上。漏配时 Awake 显式报错且不注册(不以标记
自身位置兜底)。Gizmos 增画复活点(青色)与触发区连线,漏配
画红叉警示。PlaceCheckpointMarker 脚手架自动创建并绑定
RespawnPoint 子节点。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-06-12 11:26:02 +08:00
parent bedb0f8ff4
commit 5ccab35948
2 changed files with 35 additions and 1 deletions

View File

@@ -1636,8 +1636,14 @@ namespace BaseGames.Editor
AssignLayerMask(marker, "_playerLayers", "Player", report);
AssignAsset(marker, "_onCheckpointReached", report, false, "EVT_CheckpointReached");
// RespawnPoint 子节点:玩家回溯时的出生位置(触发区与出生点解耦)
Transform respawnT = GetOrCreateChild(go.transform, "RespawnPoint");
respawnT.localPosition = Vector3.zero;
AssignReference(marker, "_respawnPoint", respawnT, report);
report.Add("放置于跳跳乐段落的关键节点处;玩家经过后成为该房间最近检查点。");
report.Add("同一房间可放置多个,以最近经过的为准。");
report.Add("调整 RespawnPoint 子节点位置 = 玩家回溯出生位置(须落在安全平台上)。");
Selection.activeGameObject = go;
MarkDirtyAndLog("Checkpoint Marker", go, report);