Beispiel #1
0
    void Start()
    {
        cellularAutomator = GetComponent<CellularAutomator>();
        meshGenerator = GetComponent<MapMeshGenerator>();

        DrawMap();
    }
Beispiel #2
0
    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;
    }