public static void BuildMap(MapBuilderData data, Map map, EventHandler callback) { MapBuilder.fData = data; MapBuilder.fMap = map; MapBuilder.fMap.Tiles.Clear(); MapBuilder.fMap.Areas.Clear(); switch (MapBuilder.fData.Type) { case MapAutoBuildType.Warren: { MapBuilder.fEndpoints.Clear(); MapBuilder.build_tile_lists(); MapBuilder.build_warren(callback); return; } case MapAutoBuildType.FilledArea: { MapBuilder.build_filled_area(callback); return; } case MapAutoBuildType.Freeform: { MapBuilder.build_freeform_area(callback); return; } default: { return; } } }