Example #1
0
 private void InitMapList()
 {
     foreach (string mapName in mapSaver.ListOfMaps(true))
     {
         GameObject nameObj = GameObjectUtil.Instantiate(mapNameObj, Vector3.zero, transform);
         nameObj.transform.localScale       = Vector3.one;
         nameObj.GetComponent <Text>().text = mapName.Substring(mapSaver.GetFilePath(true).Length);
         nameObj.GetComponent <MapListElement>().Init();
     }
 }
Example #2
0
 private bool IsMapExist(string mapName)
 {
     string[] mapList = mapSaver.ListOfMaps(true, false);
     for (int i = 0; i < mapList.Length; i++)
     {
         if (mapList[i].Equals(mapName))
         {
             return(true);
         }
     }
     return(false);
 }