Example #1
0
    void TunnelingUI()
    {
        manager.maxTunnels        = EditorGUILayout.IntField("Max tunnels count", manager.maxTunnels);
        manager.maxTunnelLength   = EditorGUILayout.IntField("Max tunnel length", manager.maxTunnelLength);
        manager.minTunnelLength   = EditorGUILayout.IntField("Min tunnel length", manager.minTunnelLength);
        manager.tunnelWidth       = EditorGUILayout.IntField("Tunnel width", manager.tunnelWidth);
        manager.maxRRoomSize      = EditorGUILayout.IntField("Max rectangle room size", manager.maxRRoomSize);
        manager.minRRoomSize      = EditorGUILayout.IntField("Min rectangle room size", manager.minRRoomSize);
        manager.maxCRoomRadius    = EditorGUILayout.IntField("Max circle room radius", manager.maxCRoomRadius);
        manager.minCRoomRadius    = EditorGUILayout.IntField("Min circle room radius", manager.minCRoomRadius);
        manager.buildRectRoom     = EditorGUILayout.Toggle("Build rectangle rooms", manager.buildRectRoom);
        manager.buildCircleRoom   = EditorGUILayout.Toggle("Build circle rooms", manager.buildCircleRoom);
        manager.randomTunnelWidth = EditorGUILayout.Toggle("Randomize tunnel width", manager.randomTunnelWidth);

        if (buildMap)
        {
            manager.ClearAllMaps();
            manager.GenerateNewMap("Tunneling");
        }
    }