From 3a672f0591c4acdda47b9dde87c2949dd225153a Mon Sep 17 00:00:00 2001 From: swrring Date: Wed, 13 May 2026 20:02:43 +0900 Subject: [PATCH] =?UTF-8?q?fix(BT12-Dev):=20Player=20=EC=82=AC=EB=A7=9D=20?= =?UTF-8?q?=EC=A0=9C=EC=9E=90=EB=A6=AC=C2=B7=EB=B6=80=ED=99=9C=20=EB=AA=A8?= =?UTF-8?q?=EC=85=98=C2=B7=EB=AC=B4=EC=A0=81=20+=20FX=20=EC=9E=94=EC=83=81?= =?UTF-8?q?=20safety=20cap=20(PD=20=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 사망 사라지는 현상 fix: - PlayerDeath.Execute — Rigidbody2D.simulated=false (gravity 정지·제자리 사망·낙사 차단) 작업 2·3 — 제자리 부활·부활 모션·2초 무적 깜박: - PlayerSpawn.Execute — Teleport 폐기 (spawn point 영역 → 제자리) - player.health.Resurrect() 호출 (currentHP=maxHP·invulnerableUntil=2초·Animator dead=false·resurrect Trigger) - Rigidbody2D.simulated=true 복원 - PlayerInvulnerabilityFlash 영역 IsInvulnerable 자동 깜박 (2초) - 2초 후 EnablePlayerInput (조작 가능) 작업 4 — FX 잔상 safety cap 5초: - LaserSpawner.Trigger — fx Object.Destroy 누락 fix (LaserSpawner 영역 본 영역 영역 영역 직접 원인 가능) - LightningStrikeSpawner.AutoDestroyFx — cap - MeleeAreaSpawner.Trigger — cap - Projectile.AutoDestroyOnParticleEnd — cap Co-Authored-By: Claude Opus 4.7 (1M context) --- Assets/Scripts/Gameplay/PlayerDeath.cs | 4 ++++ Assets/Scripts/Gameplay/PlayerSpawn.cs | 14 +++++++++++--- Assets/Scripts/Skills/Effectors/LaserSpawner.cs | 2 ++ .../Skills/Effectors/LightningStrikeSpawner.cs | 3 ++- .../Scripts/Skills/Effectors/MeleeAreaSpawner.cs | 3 ++- Assets/Scripts/Skills/Effectors/Projectile.cs | 3 ++- 6 files changed, 23 insertions(+), 6 deletions(-) diff --git a/Assets/Scripts/Gameplay/PlayerDeath.cs b/Assets/Scripts/Gameplay/PlayerDeath.cs index 99f965a..680242d 100644 --- a/Assets/Scripts/Gameplay/PlayerDeath.cs +++ b/Assets/Scripts/Gameplay/PlayerDeath.cs @@ -31,6 +31,10 @@ namespace Platformer.Gameplay // PD 지시 2026-05-13 — 사망 모션 시각 위치 보정 y -0.3 (sprite 위로 떠 보이는 현상 정정) player.transform.position += new Vector3(0f, -0.3f, 0f); + // PD 지시 2026-05-13 — Player 사망 시 사라지는 현상 fix — Rigidbody2D.simulated=false (gravity 정지·제자리 사망·낙사 차단) + var body = player.GetComponent(); + if (body != null) body.simulated = false; + player.animator.SetTrigger("hurt"); player.animator.SetBool("dead", true); Simulation.Schedule(2); diff --git a/Assets/Scripts/Gameplay/PlayerSpawn.cs b/Assets/Scripts/Gameplay/PlayerSpawn.cs index 468a94d..c0ebc2f 100644 --- a/Assets/Scripts/Gameplay/PlayerSpawn.cs +++ b/Assets/Scripts/Gameplay/PlayerSpawn.cs @@ -18,10 +18,18 @@ namespace Platformer.Gameplay player.controlEnabled = false; if (player.audioSource && player.respawnAudio) player.audioSource.PlayOneShot(player.respawnAudio); - player.health.Increment(); - player.Teleport(model.spawnPoint.transform.position); + + // PD 지시 2026-05-13 — 제자리 부활 (Teleport 폐기) + Health.Resurrect 호출 + // Resurrect = currentHP=maxHP·invulnerableUntil=2초·Animator dead=false·resurrect Trigger + // PlayerInvulnerabilityFlash 영역 IsInvulnerable 자동 깜박 (2초) + player.health.Resurrect(); + + // PD 지시 2026-05-13 — PlayerDeath 영역 Rigidbody2D.simulated=false 복원 + var body = player.GetComponent(); + if (body != null) body.simulated = true; + player.jumpState = PlayerController.JumpState.Grounded; - player.animator.SetBool("dead", false); + // animator.SetBool("dead", false)·SetTrigger("resurrect") = Health.Resurrect 내부 호출됨 model.virtualCamera.Follow = player.transform; model.virtualCamera.LookAt = player.transform; Simulation.Schedule(2f); diff --git a/Assets/Scripts/Skills/Effectors/LaserSpawner.cs b/Assets/Scripts/Skills/Effectors/LaserSpawner.cs index 86c2691..44f59a3 100644 --- a/Assets/Scripts/Skills/Effectors/LaserSpawner.cs +++ b/Assets/Scripts/Skills/Effectors/LaserSpawner.cs @@ -42,6 +42,8 @@ namespace EerieVillage.Skills.Effectors } float fxLifetime = GetFxLifetime(fx); + // PD 지시 2026-05-13 — fx AutoDestroy 누락 fix·safety cap 5초 (잔상 차단) + if (fx != null) Object.Destroy(fx, Mathf.Min(fxLifetime + 0.2f, 5f)); int damage = Mathf.Max(data.BaseDamage, 1); float length = Mathf.Max(data.HitboxSize.x, 1f); float width = Mathf.Max(data.HitboxSize.y, 0.5f); diff --git a/Assets/Scripts/Skills/Effectors/LightningStrikeSpawner.cs b/Assets/Scripts/Skills/Effectors/LightningStrikeSpawner.cs index e909fe2..0e3a4e6 100644 --- a/Assets/Scripts/Skills/Effectors/LightningStrikeSpawner.cs +++ b/Assets/Scripts/Skills/Effectors/LightningStrikeSpawner.cs @@ -154,7 +154,8 @@ namespace EerieVillage.Skills.Effectors static void AutoDestroyFx(GameObject fxGo, float lifetime) { if (fxGo == null) return; - Object.Destroy(fxGo, lifetime + 0.2f); + // PD 지시 2026-05-13 — FX 잔상 safety cap 5초 + Object.Destroy(fxGo, Mathf.Min(lifetime + 0.2f, 5f)); } } } diff --git a/Assets/Scripts/Skills/Effectors/MeleeAreaSpawner.cs b/Assets/Scripts/Skills/Effectors/MeleeAreaSpawner.cs index 211eb57..003ee82 100644 --- a/Assets/Scripts/Skills/Effectors/MeleeAreaSpawner.cs +++ b/Assets/Scripts/Skills/Effectors/MeleeAreaSpawner.cs @@ -41,7 +41,8 @@ namespace EerieVillage.Skills.Effectors // Player 자식 부착 (worldPositionStays=true) 으로 spawn 후에도 Player 이동에 동조. fxGo.transform.SetParent(inventory.transform, true); fxLifetime = GetFxLifetime(fxGo); - Object.Destroy(fxGo, fxLifetime + 0.2f); + // PD 지시 2026-05-13 — FX 잔상 safety cap 5초 + Object.Destroy(fxGo, Mathf.Min(fxLifetime + 0.2f, 5f)); } // PD 지시 2026-05-13 — 박스 영역 Player 자식 영역 부착·매 frame Player 따라감 diff --git a/Assets/Scripts/Skills/Effectors/Projectile.cs b/Assets/Scripts/Skills/Effectors/Projectile.cs index 71af439..9522ca1 100644 --- a/Assets/Scripts/Skills/Effectors/Projectile.cs +++ b/Assets/Scripts/Skills/Effectors/Projectile.cs @@ -292,7 +292,8 @@ namespace EerieVillage.Skills.Effectors var main = ps.main; lifetime = main.duration + main.startLifetime.constantMax + 0.2f; } - Object.Destroy(fxGo, lifetime); + // PD 지시 2026-05-13 — FX 잔상 safety cap 5초 + Object.Destroy(fxGo, Mathf.Min(lifetime, 5f)); } } }