95 lines
5.1 KiB
C#
95 lines
5.1 KiB
C#
|
|
using UnityEngine;
|
||
|
|
|
||
|
|
namespace EerieVillage.Map.Data
|
||
|
|
{
|
||
|
|
/// <summary>
|
||
|
|
/// BT13-Dev-Map Phase 2-A — 절차 생성 옵션 SOT.
|
||
|
|
/// PD 결정 (a) 단일 채택 2026-05-18 영역 §15-11 (옵션 12종 모두 노출).
|
||
|
|
/// PD §15 OVERRIDE 6건 (2026-05-18) — 15-2 이중 점프·15-5 공중 발판·15-7 재-spawn·15-9 BossRoom 정합.
|
||
|
|
/// spec §4-1 정합.
|
||
|
|
/// </summary>
|
||
|
|
[CreateAssetMenu(menuName = "EerieVillage/Map/Generation Config", fileName = "MapGenerationConfig")]
|
||
|
|
public class MapGenerationConfig : ScriptableObject
|
||
|
|
{
|
||
|
|
[Header("[1] 길이 영역 — PD 결정 §15-10 Tile 단위")]
|
||
|
|
[Tooltip("가로 Tile 총 길이 (1 Tile = 1 Unity unit)")]
|
||
|
|
public int lengthTiles = 120;
|
||
|
|
|
||
|
|
[Header("[2-4] 거점·밀도 영역 — PD §15-5 OVERRIDE (2026-05-18): 공중 발판 거점 허용")]
|
||
|
|
[Range(0f, 1f)] public float spawnDensity = 0.4f;
|
||
|
|
public int minSpawnSpacingTiles = 12;
|
||
|
|
public int maxSpawnPerMap = 16;
|
||
|
|
[Tooltip("§15-5 OVERRIDE — 공중 발판 SpawnPoint 허용 (true: 발판 폭 ≥3 Tile 영역 거점 후보)")]
|
||
|
|
public bool allowFloatingSpawnPoints = true;
|
||
|
|
|
||
|
|
[Header("[5-9] 발판 영역 — §6 발판 룰 (이중 점프 H_max=11.24m·SAFE 10.11m·90%)")]
|
||
|
|
[Range(0f, 1f)] public float platformDensity = 0.5f;
|
||
|
|
[Tooltip("발판 간 수평 간격 min — 3 Tile (3m)·연속 점프 리듬")]
|
||
|
|
public int minPlatformGapTiles = 3;
|
||
|
|
[Tooltip("발판 간 수평 간격 max — 10 Tile (10m)·이중 점프 SAFE_HORIZONTAL_DISTANCE 11.56m 안")]
|
||
|
|
public int maxPlatformGapTiles = 10;
|
||
|
|
[Tooltip("발판 폭 min — 2 Tile (cliffCheckDistance=1m 안전 patrol)")]
|
||
|
|
public int minPlatformWidthTiles = 2;
|
||
|
|
[Tooltip("발판 폭 max — 6 Tile (단조 회피)")]
|
||
|
|
public int maxPlatformWidthTiles = 6;
|
||
|
|
[Tooltip("지면 위 Tile 단위 — min 2m·Player 캡슐 영역 점프 의무")]
|
||
|
|
public int minPlatformHeight = 2;
|
||
|
|
[Tooltip("지면 위 Tile 단위 — max 10m·이중 점프 SAFE_VERTICAL_HEIGHT 10.11m 안")]
|
||
|
|
public int maxPlatformHeight = 10;
|
||
|
|
|
||
|
|
[Header("[10-11] Start/Goal 영역 — PD 결정 §15-6 좌측 고정")]
|
||
|
|
public int startMarginTiles = 4;
|
||
|
|
public int goalMarginTiles = 4;
|
||
|
|
|
||
|
|
[Header("[12] 리소스 영역")]
|
||
|
|
public MapResourceCatalog catalog;
|
||
|
|
|
||
|
|
[Header("청크 영역 — PD 결정 §15-3 기본 고정·EditorWindow 미노출")]
|
||
|
|
[Tooltip("청크 단위 (Tile 수) — 20 권고 (단조 영역 회피)")]
|
||
|
|
public int chunkSizeTiles = 20;
|
||
|
|
[Range(0f, 1f)] public float introPlatformDensityMultiplier = 0.6f;
|
||
|
|
[Range(0f, 1f)] public float midPlatformDensityMultiplier = 1.2f;
|
||
|
|
[Range(0f, 1f)] public float bossPrePlatformDensityMultiplier = 0.8f;
|
||
|
|
|
||
|
|
[Header("지면 영역 — Perlin 변조 (자연스러운 고저차)")]
|
||
|
|
[Tooltip("지면 base Y (Tile 단위)")]
|
||
|
|
public int groundBaseY = 0;
|
||
|
|
[Tooltip("Perlin amplitude (±N Tile)")]
|
||
|
|
public int groundPerlinAmplitude = 2;
|
||
|
|
public float groundPerlinScale = 0.1f;
|
||
|
|
|
||
|
|
[Header("Enemy 영역 — PD §15-8 OVERRIDE (2026-05-18): MonsterRandomizer 활용 (Enemy.prefab 단일)")]
|
||
|
|
[Range(0f, 1f)] public float flyingEnemyRatio = 0.15f; // 공중 enemy 비율
|
||
|
|
|
||
|
|
[Header("Enemy 재-spawn — PD §15-7 OVERRIDE (2026-05-18): timer·count 옵션")]
|
||
|
|
[Tooltip("Enemy 사망 후 재-spawn 대기 시간 (초) — 0 이하 시 재-spawn X")]
|
||
|
|
public float respawnTimer = 5f;
|
||
|
|
[Tooltip("최대 재-spawn 횟수 — -1: 무제한·0: 재-spawn X·N: N회")]
|
||
|
|
public int respawnMaxCount = -1;
|
||
|
|
|
||
|
|
[Header("Boss Room — PD §15-9 OVERRIDE (2026-05-18): 자동 생성 (맵 우측 끝)")]
|
||
|
|
[Tooltip("Boss Room 활성 — true: 우측 끝 영역 평탄 청크 + Boss spawn 마커 자동 배치")]
|
||
|
|
public bool bossRoomEnabled = true;
|
||
|
|
[Tooltip("Boss Room 길이 (Tile) — 평탄 청크 영역 영역")]
|
||
|
|
public int bossRoomLengthTiles = 20;
|
||
|
|
|
||
|
|
public void OnValidate()
|
||
|
|
{
|
||
|
|
lengthTiles = Mathf.Max(20, lengthTiles);
|
||
|
|
minSpawnSpacingTiles = Mathf.Max(2, minSpawnSpacingTiles);
|
||
|
|
maxSpawnPerMap = Mathf.Max(0, maxSpawnPerMap);
|
||
|
|
minPlatformGapTiles = Mathf.Max(1, minPlatformGapTiles);
|
||
|
|
maxPlatformGapTiles = Mathf.Max(minPlatformGapTiles, maxPlatformGapTiles);
|
||
|
|
minPlatformWidthTiles = Mathf.Max(2, minPlatformWidthTiles);
|
||
|
|
maxPlatformWidthTiles = Mathf.Max(minPlatformWidthTiles, maxPlatformWidthTiles);
|
||
|
|
minPlatformHeight = Mathf.Max(1, minPlatformHeight);
|
||
|
|
maxPlatformHeight = Mathf.Clamp(maxPlatformHeight, minPlatformHeight, 10); // §15-2 OVERRIDE 이중 점프 SAFE_VERTICAL_HEIGHT 10.11m cap
|
||
|
|
startMarginTiles = Mathf.Max(2, startMarginTiles);
|
||
|
|
goalMarginTiles = Mathf.Max(2, goalMarginTiles);
|
||
|
|
chunkSizeTiles = Mathf.Max(5, chunkSizeTiles);
|
||
|
|
respawnTimer = Mathf.Max(0f, respawnTimer);
|
||
|
|
bossRoomLengthTiles = Mathf.Max(5, bossRoomLengthTiles);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|