From 69a18052a05a06eefda64862baeaeb902f7cd83e Mon Sep 17 00:00:00 2001 From: swrring Date: Wed, 13 May 2026 20:10:11 +0900 Subject: [PATCH] =?UTF-8?q?fix(BT12-Dev):=20Player=20=EC=A3=BD=EB=8A=94=20?= =?UTF-8?q?=EB=AA=A8=EC=85=98=C2=B7=EB=B6=80=ED=99=9C=20=EB=AC=BC=EB=A6=AC?= =?UTF-8?q?=C2=B7=ED=88=AC=EC=82=AC=EC=B2=B4=20=EC=A7=84=EB=8B=A8=20(PD=20?= =?UTF-8?q?=EC=A7=80=EC=8B=9C=202026-05-13)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 작업 1 — Player 죽는 모션 X fix: - PlayerDeath.Execute — SetTrigger("hurt") → SetTrigger("hit") (Player.controller parameter 정합: velocityX·velocityY·grounded·attack·dead·hit·combatidle·resurrect·hurt 없음) - animator.updateMode = AnimatorUpdateMode.UnscaledTime 추가 (EnemyDeath 영역 동일·timeScale=0 영향 차단) 작업 2 — 부활 모션 중 움직임 fix: - PlayerSpawn.Execute — Rigidbody2D.simulated=true 복원 폐기 (즉시 X) - EnablePlayerInput.Execute — Rigidbody2D.simulated=true 복원 추가 (2초 후·부활 모션 종료 시점) - using UnityEngine 추가 (CS0246 회피) 작업 3 — 투사체 잔상 진단 (회수 의무): - Projectile.SelfDestruct — [Projectile][SelfDestruct] Debug.Log - Projectile.OnDestroy — [Projectile][OnDestroy] Debug.Log (Destroy 외 경로 검출용) - PD Console 측정 결과 영역 본 PM 근본 fix 후 revert Co-Authored-By: Claude Opus 4.7 (1M context) --- Assets/Scripts/Gameplay/EnablePlayerInput.cs | 4 ++++ Assets/Scripts/Gameplay/PlayerDeath.cs | 4 +++- Assets/Scripts/Gameplay/PlayerSpawn.cs | 4 +--- Assets/Scripts/Skills/Effectors/Projectile.cs | 8 ++++++++ 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/Assets/Scripts/Gameplay/EnablePlayerInput.cs b/Assets/Scripts/Gameplay/EnablePlayerInput.cs index ede1d7c..9ee3318 100644 --- a/Assets/Scripts/Gameplay/EnablePlayerInput.cs +++ b/Assets/Scripts/Gameplay/EnablePlayerInput.cs @@ -1,3 +1,4 @@ +using UnityEngine; using Platformer.Core; using Platformer.Model; @@ -14,6 +15,9 @@ namespace Platformer.Gameplay { var player = model.player; player.controlEnabled = true; + // PD 지시 2026-05-13 — 부활 모션 종료 시점 Rigidbody2D.simulated 복원 (PlayerDeath 영역 disable 영역 복원) + var body = player.GetComponent(); + if (body != null) body.simulated = true; } } } \ No newline at end of file diff --git a/Assets/Scripts/Gameplay/PlayerDeath.cs b/Assets/Scripts/Gameplay/PlayerDeath.cs index 680242d..90f171d 100644 --- a/Assets/Scripts/Gameplay/PlayerDeath.cs +++ b/Assets/Scripts/Gameplay/PlayerDeath.cs @@ -35,7 +35,9 @@ namespace Platformer.Gameplay var body = player.GetComponent(); if (body != null) body.simulated = false; - player.animator.SetTrigger("hurt"); + // PD 지시 2026-05-13 — Player.controller parameter 정합 "hit" Trigger (구 "hurt" parameter 부재) + UnscaledTime + player.animator.updateMode = AnimatorUpdateMode.UnscaledTime; + player.animator.SetTrigger("hit"); player.animator.SetBool("dead", true); Simulation.Schedule(2); } diff --git a/Assets/Scripts/Gameplay/PlayerSpawn.cs b/Assets/Scripts/Gameplay/PlayerSpawn.cs index b8c97d7..ee77a55 100644 --- a/Assets/Scripts/Gameplay/PlayerSpawn.cs +++ b/Assets/Scripts/Gameplay/PlayerSpawn.cs @@ -25,9 +25,7 @@ namespace Platformer.Gameplay // PlayerInvulnerabilityFlash 영역 IsInvulnerable 자동 깜박 (2초) player.health.Resurrect(); - // PD 지시 2026-05-13 — PlayerDeath 영역 Rigidbody2D.simulated=false 복원 - var body = player.GetComponent(); - if (body != null) body.simulated = true; + // PD 지시 2026-05-13 — Rigidbody2D.simulated 복원 = EnablePlayerInput 영역 (2초 후) 이전·즉시 X (부활 모션 중 움직임 차단) player.jumpState = PlayerController.JumpState.Grounded; // animator.SetBool("dead", false)·SetTrigger("resurrect") = Health.Resurrect 내부 호출됨 diff --git a/Assets/Scripts/Skills/Effectors/Projectile.cs b/Assets/Scripts/Skills/Effectors/Projectile.cs index 9522ca1..c2ffe36 100644 --- a/Assets/Scripts/Skills/Effectors/Projectile.cs +++ b/Assets/Scripts/Skills/Effectors/Projectile.cs @@ -229,10 +229,18 @@ namespace EerieVillage.Skills.Effectors protected void SelfDestruct() { + // PD 지시 2026-05-13 — 투사체 잔상 진단 (회수 의무) + Debug.Log($"[Projectile][SelfDestruct] name={name} pos=({transform.position.x:F2},{transform.position.y:F2}) t={Time.time:F2}"); CancelInvoke(nameof(SelfDestruct)); Destroy(gameObject); } + // PD 지시 2026-05-13 — 투사체 잔상 진단 (회수 의무·Destroy 호출 외 경로 영역 영역 영역 검출) + void OnDestroy() + { + Debug.Log($"[Projectile][OnDestroy] name={name} t={Time.time:F2}"); + } + // PD 지시 2026-05-13 — 시각화 박스 자식 reference (Update 영역 매 frame Inspector 정합 갱신용) protected Transform _debugBoxTransform;