Beispiel #1
0
        public static List <LayerData> OpenFile(ArchitectLinker linker, string fileName, Transform mapParent)
        {
            WorldOpener wo = new WorldOpener(linker, mapParent);

            string[] fileContent = System.IO.File.ReadAllLines(fileName);
            return(wo.Load(fileContent));
        }
Beispiel #2
0
        public void Open(string path)
        {
            OpenFileBrowser.gameObject.SetActive(false);
            clearAllLayer();
            var layers = WorldOpener.OpenFile(Linker, path, MapParent);

            mapDimension = new Point2(layers[0].LayerWidth, layers[0].LayerHeight);
            Layers.AddRange(layers);
            SelectedLayer = layers[0];
            //LayerPanel.RefreshUI();
            ResetGridSize();
        }
Beispiel #3
0
 static void LoadMap()
 {
     if (linker == null)
     {
         Debug.Log("Yo doit select un Linker");
     }
     else
     {
         string     path = AssetDatabaseUtility.GetSelectedAssetPath();
         GameObject map  = new GameObject("Map");
         WorldOpener.OpenFile(linker, path, map.transform);
     }
 }
 public static List<LayerData> OpenFile(ArchitectLinker linker, string fileName, Transform mapParent)
 {
     WorldOpener wo = new WorldOpener(linker, mapParent);
     string[] fileContent = System.IO.File.ReadAllLines(fileName);
     return wo.Load(fileContent);
 }