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:
@@ -248,6 +248,7 @@ GameObject:
|
||||
- component: {fileID: 8116248334753210478}
|
||||
- component: {fileID: 2674139131311821727}
|
||||
- component: {fileID: 1348220184733719450}
|
||||
- component: {fileID: 6289226623396459915}
|
||||
m_Layer: 9
|
||||
m_Name: Player
|
||||
m_TagString: Player
|
||||
@@ -777,8 +778,22 @@ MonoBehaviour:
|
||||
serializedVersion: 2
|
||||
m_Bits: 16777216
|
||||
_inputReader: {fileID: 11400000, guid: 88fadef8bc554e04483edd7418d20aa2, type: 2}
|
||||
_onShowInteractPrompt: {fileID: 11400000, guid: 18bb3dbe7d352dc4a9b62b13e068eb9d, type: 2}
|
||||
_onHideInteractPrompt: {fileID: 11400000, guid: b8cfbee27c2493e4ea75b4158a74a7c4, type: 2}
|
||||
--- !u!114 &6289226623396459915
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6834103521996502824}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 7ca41f67644b6b843ba7ef65e78b13e5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_onCheckpointRespawn: {fileID: 11400000, guid: eef5aef659932dd448be6d91119082e6, type: 2}
|
||||
_onFadeOutRequest: {fileID: 11400000, guid: a17901d6793dcf2409e2672ffb383208, type: 2}
|
||||
_onFadeInRequest: {fileID: 11400000, guid: f8d520fe699782b4184ff72ce5200c25, type: 2}
|
||||
_fadeHalfDuration: 0.2
|
||||
--- !u!1001 &5247753868797769228
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -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._animConfig(PLY_PlayerAnimationConfig)");
|
||||
if (statsConfig == null) report.Add("★ 需创建并绑定:PlayerStats._config(PlayerStatsSO)");
|
||||
if (inputReader == null) report.Add("★ 需手动绑定:PlayerController._inputReader / FormController._input / SkillManager._input(InputReaderSO)");
|
||||
|
||||
Reference in New Issue
Block a user