diff --git a/Assets/Scripts/Skills/Effectors/CloneInstance.cs b/Assets/Scripts/Skills/Effectors/CloneInstance.cs index ff18485..bda07e5 100644 --- a/Assets/Scripts/Skills/Effectors/CloneInstance.cs +++ b/Assets/Scripts/Skills/Effectors/CloneInstance.cs @@ -191,6 +191,19 @@ namespace EerieVillage.Skills.Effectors return; } + // PD 지시 2026-05-18 — Player 영역 영역 영역 영역 분신 즉시 destroy (영역 영역 영역 X) + if (_playerInventory == null) + { + Destroy(gameObject); + return; + } + var playerHealth = _playerInventory.GetComponent(); + if (playerHealth != null && !playerHealth.IsAlive) + { + Destroy(gameObject); + return; + } + // BT12-Dev-Clone (2026-05-18) — 매 frame Player sprite 동기화 + 위치 영역 영역 영역 SyncSpriteAndPosition(); @@ -218,15 +231,16 @@ namespace EerieVillage.Skills.Effectors // 2. PD 지시 2026-05-18 — 목표 위치 영역 = Player worldPos + facing 반대 0.5 영역 (50% 영역) // SetParent X · 독립 GameObject 영역 — Player.localScale 영역 영역 영역 영역 영역 영역 영역. + // PD 지시 2026-05-18 — _spawnFacingX 매 frame 영역 영역 (Player facing 영역) → 분신 발동 시 투사체 영역 정합 영역. Vector3 playerWorldPos = _playerInventory.transform.position; - float signX = 1f; var pc = _playerInventory.GetComponent(); if (pc != null) { Vector2 facing = pc.Facing; if (facing.sqrMagnitude > 0.01f) - signX = facing.x < 0f ? -1f : 1f; + _spawnFacingX = facing.x < 0f ? -1f : 1f; // 매 frame Player facing 영역 영역 갱신 } + float signX = _spawnFacingX; _targetLocalPos = playerWorldPos + new Vector3(-signX * SPAWN_OFFSET_X, 0f, 0f); // worldPos target // 3. 영역 영역 영역 영역 영역 영역 영역 (MoveTowards · worldPos 기반)