fix(BT12-Dev): Player 죽는 모션·부활 물리·투사체 진단 (PD 지시 2026-05-13)
작업 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) <noreply@anthropic.com>
This commit is contained in:
parent
c052d78114
commit
69a18052a0
|
|
@ -1,3 +1,4 @@
|
||||||
|
using UnityEngine;
|
||||||
using Platformer.Core;
|
using Platformer.Core;
|
||||||
using Platformer.Model;
|
using Platformer.Model;
|
||||||
|
|
||||||
|
|
@ -14,6 +15,9 @@ namespace Platformer.Gameplay
|
||||||
{
|
{
|
||||||
var player = model.player;
|
var player = model.player;
|
||||||
player.controlEnabled = true;
|
player.controlEnabled = true;
|
||||||
|
// PD 지시 2026-05-13 — 부활 모션 종료 시점 Rigidbody2D.simulated 복원 (PlayerDeath 영역 disable 영역 복원)
|
||||||
|
var body = player.GetComponent<Rigidbody2D>();
|
||||||
|
if (body != null) body.simulated = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -35,7 +35,9 @@ namespace Platformer.Gameplay
|
||||||
var body = player.GetComponent<Rigidbody2D>();
|
var body = player.GetComponent<Rigidbody2D>();
|
||||||
if (body != null) body.simulated = false;
|
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);
|
player.animator.SetBool("dead", true);
|
||||||
Simulation.Schedule<PlayerSpawn>(2);
|
Simulation.Schedule<PlayerSpawn>(2);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,9 +25,7 @@ namespace Platformer.Gameplay
|
||||||
// PlayerInvulnerabilityFlash 영역 IsInvulnerable 자동 깜박 (2초)
|
// PlayerInvulnerabilityFlash 영역 IsInvulnerable 자동 깜박 (2초)
|
||||||
player.health.Resurrect();
|
player.health.Resurrect();
|
||||||
|
|
||||||
// PD 지시 2026-05-13 — PlayerDeath 영역 Rigidbody2D.simulated=false 복원
|
// PD 지시 2026-05-13 — Rigidbody2D.simulated 복원 = EnablePlayerInput 영역 (2초 후) 이전·즉시 X (부활 모션 중 움직임 차단)
|
||||||
var body = player.GetComponent<Rigidbody2D>();
|
|
||||||
if (body != null) body.simulated = true;
|
|
||||||
|
|
||||||
player.jumpState = PlayerController.JumpState.Grounded;
|
player.jumpState = PlayerController.JumpState.Grounded;
|
||||||
// animator.SetBool("dead", false)·SetTrigger("resurrect") = Health.Resurrect 내부 호출됨
|
// animator.SetBool("dead", false)·SetTrigger("resurrect") = Health.Resurrect 내부 호출됨
|
||||||
|
|
|
||||||
|
|
@ -229,10 +229,18 @@ namespace EerieVillage.Skills.Effectors
|
||||||
|
|
||||||
protected void SelfDestruct()
|
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));
|
CancelInvoke(nameof(SelfDestruct));
|
||||||
Destroy(gameObject);
|
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 정합 갱신용)
|
// PD 지시 2026-05-13 — 시각화 박스 자식 reference (Update 영역 매 frame Inspector 정합 갱신용)
|
||||||
protected Transform _debugBoxTransform;
|
protected Transform _debugBoxTransform;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue