void Start() { cellularAutomator = GetComponent<CellularAutomator>(); meshGenerator = GetComponent<MapMeshGenerator>(); DrawMap(); }
public static Map GenerateMap(int width, int height, int borderSize, int randomFillPercent, CellularAutomator cellularAutomator) { Map map = new Map(width, height); RandomFillMap(map, randomFillPercent); cellularAutomator.CellularAutomate(map); MapRoomProcessor processor = new MapRoomProcessor(map); processor.ProcessRooms(); Map borderedMap = CreateBorderedMap(map, borderSize); return borderedMap; }