76 lines
2.1 KiB
C#
76 lines
2.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.Tilemaps;
|
|
|
|
namespace EerieVillage.Map.Data
|
|
{
|
|
/// <summary>
|
|
/// BT13-Dev-Map Phase 2-A — 절차 생성 결과 in-memory SOT.
|
|
/// MapGenerator.Generate(config) → MapBlueprint 반환.
|
|
/// MapApplier·MapPreviewRenderer 영역 본 데이터 영역 직접 활용.
|
|
/// spec §4-2 정합.
|
|
/// </summary>
|
|
[Serializable]
|
|
public class MapBlueprint
|
|
{
|
|
public int lengthTiles;
|
|
public int heightTiles;
|
|
public int generationSeed; // 디버그 추적용 (재현 의무 시 활용)
|
|
|
|
public List<TerrainTilePlace> terrain = new List<TerrainTilePlace>();
|
|
public List<PlatformTilePlace> platforms = new List<PlatformTilePlace>();
|
|
public List<SpawnPointPlace> spawnPoints = new List<SpawnPointPlace>();
|
|
|
|
public Vector2 startPoint;
|
|
public Vector2 goalPoint;
|
|
|
|
public List<PropPlace> backgroundProps = new List<PropPlace>();
|
|
public List<GimmickPlace> gimmicks = new List<GimmickPlace>();
|
|
|
|
/// <summary>지면 표면 y(Tile 단위) — x 영역 인덱스 영역. terrain 영역 동기화 영역 산출.</summary>
|
|
public int[] groundSurfaceY;
|
|
}
|
|
|
|
[Serializable]
|
|
public struct TerrainTilePlace
|
|
{
|
|
public int x;
|
|
public int y;
|
|
public TileBase tile;
|
|
}
|
|
|
|
[Serializable]
|
|
public struct PlatformTilePlace
|
|
{
|
|
public int x;
|
|
public int y;
|
|
public TileBase tile;
|
|
/// <summary>0=LeftEdge·1=Middle·2=RightEdge</summary>
|
|
public int edgeKind;
|
|
}
|
|
|
|
[Serializable]
|
|
public struct SpawnPointPlace
|
|
{
|
|
public Vector2 position;
|
|
public GameObject enemyPrefab;
|
|
public bool isFlying;
|
|
}
|
|
|
|
[Serializable]
|
|
public struct PropPlace
|
|
{
|
|
public Vector2 position;
|
|
public GameObject prefab;
|
|
}
|
|
|
|
[Serializable]
|
|
public struct GimmickPlace
|
|
{
|
|
public Vector2 position;
|
|
public GameObject prefab;
|
|
public string kind; // "MovingPlatform·Trap·CheckPoint" 등
|
|
}
|
|
}
|