chore(BT12-Dev-Death): Health.cs 진단 Debug.Log 3줄 회수 — 사망 원인 확정 후 회수 의무 정합
회수 영역: - Decrement(damage) line 132 — Debug.Log + StackTrace 1줄 - DecrementSilent(damage) line 205 — Debug.Log 1줄 - Die() line 257 — Debug.Log + StackTrace 1줄 진단 도구 회수 누적: Projectile 8 + AttackHitbox 1 + EnemyDeath 1 + Health 3 = 13줄 전수 회수. PD 정합 (2026-05-10): "이제 정상적으로 적이 죽는거 같아."
This commit is contained in:
parent
6a825fc9b7
commit
af6ac1652c
|
|
@ -128,8 +128,6 @@ namespace Platformer.Mechanics
|
|||
|
||||
int beforeHP = currentHP;
|
||||
currentHP = Mathf.Clamp(currentHP - damage, 0, maxHP);
|
||||
// PD 지시 2026-05-09 — 사망 원인 추적 (스킬 습득 후 갑자기 사망 버그)
|
||||
Debug.Log($"[Health@{name}] Decrement(damage={damage}) hp {beforeHP}→{currentHP} t={Time.time:F2}\n{System.Environment.StackTrace}");
|
||||
|
||||
// 피격 성공 시 무적 시간 활성화 (다음 피격 대비)
|
||||
if (invulnerableDuration > 0f)
|
||||
|
|
@ -202,7 +200,6 @@ namespace Platformer.Mechanics
|
|||
|
||||
int beforeHP = currentHP;
|
||||
currentHP = Mathf.Clamp(currentHP - damage, 0, maxHP);
|
||||
Debug.Log($"[Health@{name}] DecrementSilent(damage={damage}) hp {beforeHP}→{currentHP} t={Time.time:F2}");
|
||||
if (invulnerableDuration > 0f) invulnerableUntil = Time.time + invulnerableDuration;
|
||||
|
||||
if (currentHP > 0)
|
||||
|
|
@ -254,7 +251,6 @@ namespace Platformer.Mechanics
|
|||
/// </summary>
|
||||
public void Die()
|
||||
{
|
||||
Debug.Log($"[Health@{name}] Die() called t={Time.time:F2}\n{System.Environment.StackTrace}");
|
||||
invulnerableUntil = -1f; // i-frame 무효화
|
||||
if (currentHP > 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue