Beispiel #1
0
 public MapLoader(MapLinker linker)
 {
     if (linker == null)
     {
         Debug.LogError("The linker provided is null");
     }
     this.linker = linker;
 }
Beispiel #2
0
        public void loadFile(MapLinker linker, FileInfo file)
        {
            MapLoader  mapLoader = new MapLoader(linker);
            GameObject mapLoaded = mapLoader.loadFromFile(file);

            if (loadToPrefab)
            {
                makeGameObjectAsPrefab(mapLoaded, mapLoaded.name);
            }
        }
Beispiel #3
0
        void loadNewLinker()
        {
            MapLinker loadedLinker = (MapLinker)AssetDatabase.LoadAssetAtPath("Assets" + linkerPath, typeof(MapLinker));

            if (loadedLinker != null)
            {
                linker = loadedLinker;
            }
            else
            {
                Debug.LogError("Selected file not a Linker!");
            }
        }
Beispiel #4
0
        void createNewLinker()
        {
            MapLinker newLinker = (MapLinker)ScriptableObject.CreateInstance("MapLinker");

            AssetDatabase.CreateAsset(newLinker, "Assets/linker.asset");
        }
Beispiel #5
0
 public TilesetLoader(MapLinker linker)
 {
     this.linker = linker;
 }