public void LoadMap(ContentManager content) { Map = new TiledMap(TiledParser.ReadMapJson(MapName)); Map.LoadView(); Map.LoadObjects(); TilesetTextures = Map.GetTilesetNames().Aggregate(new Dictionary <string, Texture2D>(), (textures, contentName) => { textures.Add(contentName, content.Load <Texture2D>(contentName)); return(textures); }); }
private IEnumerable <string> GetTilesetNames() => Map.GetTilesetNames();