diff --git a/Assets/Scripts/Mechanics/GameOptimizer.cs b/Assets/Scripts/Mechanics/GameOptimizer.cs index a0dafd3..6c7a57e 100644 --- a/Assets/Scripts/Mechanics/GameOptimizer.cs +++ b/Assets/Scripts/Mechanics/GameOptimizer.cs @@ -71,15 +71,15 @@ namespace Platformer.Mechanics applied++; } - // 2. PD Foreground = 가림막 시각 + TilemapCollider 부착 (BT82 정정·PD 보고: Enemy 떨어짐). - // 이전 BT66 R2의 Object.Destroy 폐기 — Player는 Drop-Through 패턴 영역에서 통과·착지 분기 / Enemy는 충돌 ON. - // Layer 16 강제 (AutoForeground와 동일·Drop-Through 패턴 적용). + // BT101 — PD Foreground = 시각 가림막만 (TilemapCollider 제거·BT66 R2 영역 회복). + // BT82 부착 영역 폐기 → 숨겨진 통로 영역 Player 통과 회복. + // Enemy 절벽 차단 = BT99 투명벽 영역으로 처리 (Layer 18·EnemyWall). var pdForeground = GameObject.Find("Foreground"); if (pdForeground != null) { pdForeground.layer = 16; var pdFgTc = pdForeground.GetComponent(); - if (pdFgTc == null) pdFgTc = pdForeground.AddComponent(); + if (pdFgTc != null) Object.Destroy(pdFgTc); } // 3. AutoForeground GameObject (Grid 자식·신규) — 자동 분류 발판 전용. @@ -172,16 +172,12 @@ namespace Platformer.Mechanics int wallCount = 0; - // BT100 — 자체 가장자리 검사 = Level + AutoForeground 만 (PD Foreground = 시각 가림막·통로 영역 차단 X) + // BT101 — 자체·인접 검사 = Level + AutoForeground 만 (PD Foreground = TilemapCollider X·Enemy 발판 X·검사 영역 X) var checkTilemaps = new System.Collections.Generic.List(); if (levelTm != null) checkTilemaps.Add(levelTm); if (autoFgTm != null) checkTilemaps.Add(autoFgTm); - // 인접 검사 = Level + AutoForeground + PD Foreground 모두 (안전 영역 모두 포함) - var allTilemaps = new System.Collections.Generic.List(); - if (levelTm != null) allTilemaps.Add(levelTm); - if (autoFgTm != null) allTilemaps.Add(autoFgTm); - if (pdFgTm != null) allTilemaps.Add(pdFgTm); + var allTilemaps = checkTilemaps; foreach (var tm in checkTilemaps) {