Beispiel #1
0
 private void GetLocations(string locationDirectory, SM4MapLocationMap areaSub)
 {
     string[] locationSubDirectories = Directory.GetDirectories(locationDirectory);
     foreach (var locationSubDirectory in locationSubDirectories)
     {
         areaSub.locations.Add(GetLocationFromXml(locationSubDirectory));
     }
 }
Beispiel #2
0
    private SM4MapAreaMap GetAreas(string areaDirectory, SM4MapAreaMap area)
    {
        string[] areaSubDirectories = Directory.GetDirectories(areaDirectory);
        foreach (var areaSubDirectory in areaSubDirectories)
        {
            SM4MapLocationMap areaSub = new SM4MapLocationMap();
            areaSub.objectName = Path.GetFileName(areaSubDirectory);
            areaSub.path       = areaSubDirectory;
            if (areaSub.objectName == "Locations")
            {
                GetLocations(areaSubDirectory, areaSub);
            }
            area.locationMaps.Add(areaSub);
        }

        return(area);
    }