Ejemplo n.º 1
0
        static TileSet GetOrMakeTileset(string path)
        {
            TileSet tileset;

            if (PathLookup.ContainsKey(path))
            {
                tileset = PathLookup[path];
                tileset.MakeNew();
            }
            else
            {
                tileset = new TileSet();

                // Add the tileset to Freeplay
                CustomLevel_GUI.FreeplayTilesets.Add(tileset);
            }

            return(tileset);
        }
Ejemplo n.º 2
0
        public static void Load(string path)
        {
            BackgroundTemplate template;

            if (PathLookup.ContainsKey(path))
            {
                template = PathLookup[path];
            }
            else
            {
                template = new BackgroundTemplate();

                var name = Tools.GetFileName(path);
                template.Name = name;
                template.File = path;

                AddTemplate(template);
            }

            template.MadeOfCode = false;
            template.MadeOfText = true;
        }