コード例 #1
0
ファイル: MapDrawer.cs プロジェクト: jondbridges/ancillary
    void Start()
    {
        cellularAutomator = GetComponent<CellularAutomator>();
        meshGenerator = GetComponent<MapMeshGenerator>();

        DrawMap();
    }
コード例 #2
0
ファイル: MapGenerator.cs プロジェクト: jondbridges/ancillary
    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;
    }