Beispiel #1
0
 bool DeleteMapFromOfficial(int index)
 {
     if (index >= mapInfoJson.officialMaps.Count)
     {
         Debug.Log("out of range");
         return(false);
     }
     else
     {
         string dir    = Application.streamingAssetsPath + "/Levels/";
         string name   = mapInfoJson.officialMaps[index].name;
         string author = mapInfoJson.officialMaps[index].author;
         dir = dir + name + '_' + author;
         MyUtils.DeleteDir(dir);
         return(true);
     }
 }
Beispiel #2
0
 bool DeleteMapFromCustom(int index)
 {
     if (index >= mapInfoJson.customMaps.Count)
     {
         Debug.Log("out of range");
         return(false);
     }
     else
     {
         string dir    = Application.persistentDataPath + "/Levels/";
         string name   = mapInfoJson.customMaps[index].name;
         string author = mapInfoJson.customMaps[index].author;
         dir = dir + name + '_' + author;
         MyUtils.DeleteDir(dir);
         return(true);
     }
 }