diff --git a/Assets/Scripts/Gameplay/PlayerDeath.cs b/Assets/Scripts/Gameplay/PlayerDeath.cs index 90f171d..c0ad701 100644 --- a/Assets/Scripts/Gameplay/PlayerDeath.cs +++ b/Assets/Scripts/Gameplay/PlayerDeath.cs @@ -28,8 +28,8 @@ namespace Platformer.Gameplay if (player.audioSource && player.ouchAudio) player.audioSource.PlayOneShot(player.ouchAudio); - // PD 지시 2026-05-13 — 사망 모션 시각 위치 보정 y -0.3 (sprite 위로 떠 보이는 현상 정정) - player.transform.position += new Vector3(0f, -0.3f, 0f); + // PD 지시 2026-05-13 — 사망 모션 시각 위치 보정 y -0.6 (sprite 위로 떠 보이는 현상 정정·2차 추가 -0.3) + player.transform.position += new Vector3(0f, -0.6f, 0f); // PD 지시 2026-05-13 — Player 사망 시 사라지는 현상 fix — Rigidbody2D.simulated=false (gravity 정지·제자리 사망·낙사 차단) var body = player.GetComponent(); diff --git a/Assets/Scripts/Progression/LevelUpManager.cs b/Assets/Scripts/Progression/LevelUpManager.cs index 8fc4314..fc44ded 100644 --- a/Assets/Scripts/Progression/LevelUpManager.cs +++ b/Assets/Scripts/Progression/LevelUpManager.cs @@ -22,6 +22,8 @@ namespace EerieVillage.Progression PlayerController _player; PlayerProgression _progression; bool _isLevelUpActive = false; + // PD 지시 2026-05-13 — Player 사망 상태 영역 LevelUp 발생 시 pending 저장·부활(IsAlive=true) 시 표시 + readonly System.Collections.Generic.Queue _pendingLevels = new System.Collections.Generic.Queue(); void Awake() { @@ -56,9 +58,31 @@ namespace EerieVillage.Progression if (Instance == this) Instance = null; } + void Update() + { + // PD 지시 2026-05-13 — Player 부활 영역 pending LevelUp 영역 표시 + if (_pendingLevels.Count == 0) return; + if (_isLevelUpActive) return; + if (_player == null || _player.health == null || !_player.health.IsAlive) return; + int next = _pendingLevels.Dequeue(); + ShowLevelUpUI(next); + } + void HandleLevelUp(int newLevel) { Debug.Log($"[LevelUpManager] HandleLevelUp 호출 Lv.{newLevel} _ui={(_ui == null ? "NULL" : _ui.name)}"); + // PD 지시 2026-05-13 — Player 사망 상태 영역 pending 저장 (죽는 모션 종료·부활 후 표시) + if (_player != null && _player.health != null && !_player.health.IsAlive) + { + _pendingLevels.Enqueue(newLevel); + Debug.Log($"[LevelUpManager] Player 사망 상태 영역 LevelUp pending 저장 (Lv.{newLevel})"); + return; + } + ShowLevelUpUI(newLevel); + } + + void ShowLevelUpUI(int newLevel) + { if (_isLevelUpActive) return; _isLevelUpActive = true; diff --git a/Assets/Scripts/Skills/Effectors/Projectile.cs b/Assets/Scripts/Skills/Effectors/Projectile.cs index 78ad173..3c0682d 100644 --- a/Assets/Scripts/Skills/Effectors/Projectile.cs +++ b/Assets/Scripts/Skills/Effectors/Projectile.cs @@ -86,6 +86,9 @@ namespace EerieVillage.Skills.Effectors // Phase 2-B: 풀링 미도입 — Invoke 기반 자동 소멸 (거리 제한 영역 영역 영역 영역 영역 안전망) Invoke(nameof(SelfDestruct), _lifetime); + + // PD 지시 2026-05-13 — 진단 (회수 의무·잔존 추적) + Debug.Log($"[Projectile][Initialize] name={name} dir=({_direction.x:F2},{_direction.y:F2}) speed={_speed:F2} maxRange={_maxRange:F2} lifetime={_lifetime:F2} t={Time.time:F2}"); } // BT12-Dev 2026-05-13 — 사거리 80~100% 영역 scale·alpha 보간 (PD 지시) @@ -131,6 +134,14 @@ namespace EerieVillage.Skills.Effectors return; } + // PD 지시 2026-05-13 — Invoke 영역 호출 X 영역 영역 안전망 (lifetime + 0.5초 영역 영역 강제 SelfDestruct) + if (_spawnTime > 0f && Time.time - _spawnTime > _lifetime + 0.5f) + { + Debug.Log($"[Projectile][LifetimeForce] name={name} spawn={_spawnTime:F2} now={Time.time:F2} lifetime={_lifetime:F2}"); + SelfDestruct(); + return; + } + // PD 지시 2026-05-13 — Inspector HitboxSize 변경 즉시 반영 SyncHitboxToData(); diff --git a/Assets/Scripts/Skills/Effectors/ProjectileSpawner.cs b/Assets/Scripts/Skills/Effectors/ProjectileSpawner.cs index 64eed74..cbef3e6 100644 --- a/Assets/Scripts/Skills/Effectors/ProjectileSpawner.cs +++ b/Assets/Scripts/Skills/Effectors/ProjectileSpawner.cs @@ -82,6 +82,8 @@ namespace EerieVillage.Skills.Effectors proj.Initialize(runtime, inventory, dir); } + // PD 지시 2026-05-13 — 진단 (회수 의무·잔존 추적) + UnityEngine.Debug.Log($"[ProjectileSpawner] Trigger card={data.CardId} count={count} facing=({facing.x:F2},{facing.y:F2}) t={Time.time:F2}"); } ///