fix(BT12-Dev): A04 번개 충격 적 유무 무관 자동 발동 (PD 지시 2026-05-13)
원인: LightningStrikeSpawner.Trigger 영역 candidates.Count == 0 시 즉시 return → 적 0명 영역 발동 X. fix: candidates 0 시 Player 위치 영역 fallback (primaryPos = inventory.transform.position) → 일정 쿨타임 자동 발동. A05 MeleeAreaSpawner·A_Laser LaserSpawner = Player 위치 기준 발동·적 무관 영역 이미 정합. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
26b0666912
commit
ebedf6d9ee
|
|
@ -43,13 +43,19 @@ namespace EerieVillage.Skills.Effectors
|
|||
if (p.x < xMin || p.x > xMax || p.y < yMin || p.y > yMax) continue;
|
||||
candidates.Add(e);
|
||||
}
|
||||
if (candidates.Count == 0) return;
|
||||
|
||||
// 2. 임의 1기 선택 (Primary target)
|
||||
var primary = candidates[Random.Range(0, candidates.Count)];
|
||||
// PD 지시 2026-05-13 — 적 유무 관계 없이 일정 쿨타임 자동 발동. candidates 영역 0 시 Player 위치 영역 fallback.
|
||||
Vector2 primaryPos;
|
||||
if (candidates.Count > 0)
|
||||
{
|
||||
primaryPos = candidates[Random.Range(0, candidates.Count)].transform.position;
|
||||
}
|
||||
else
|
||||
{
|
||||
primaryPos = (Vector2)inventory.transform.position;
|
||||
}
|
||||
// PD 정합 2026-05-13 — OffsetDistance = (X, Y) 절대 오프셋·OffsetXY = 이펙트만
|
||||
Vector2 hitboxPos = (Vector2)primary.transform.position + data.OffsetDistance;
|
||||
Vector2 fxPos = (Vector2)primary.transform.position + data.OffsetXY;
|
||||
Vector2 hitboxPos = primaryPos + data.OffsetDistance;
|
||||
Vector2 fxPos = primaryPos + data.OffsetXY;
|
||||
|
||||
// 3. 이펙트 spawn (data.OnHitFxPrefab — FX_Thunder) + 총 lifetime 측정
|
||||
float fxTotalLifetime = 1f;
|
||||
|
|
|
|||
Loading…
Reference in New Issue