public static Tiles LoadTilesAndTextures(string path) { Tiles tiles = new Tiles(); if (!Directory.Exists(path)) { return(null); } tiles = XmlLoader.DeSerializeObject <Tiles>(path + "Tileset.xml"); tiles.textureFolder = path + "/Textures/"; if (!Directory.Exists(tiles.textureFolder)) { Directory.CreateDirectory(tiles.textureFolder); } return(tiles); }