mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-24 20:12:23 +00:00
* mostly restored the tiled importer unit tests * code cleanup * code cleanup * almost got tiled maps serialization independent of the content pipeline * refactored the tiled map content importer so that tiled maps can be loaded at runtime * code cleanup * removed nuspec files * experimenting with an XML based GUI markup parser * a few more markup parser features * finally got a working open file dialog * experimenting with markup bindings * attached properties * working on the gui stuff again * working on a better textbox * multiline textboxing * new text box is really coming along * removed the content explorer experiment * restored the old gui demo back to the way it was before (for now)
68 lines
2.3 KiB
C#
68 lines
2.3 KiB
C#
using System.Collections.Generic;
|
|
using System.Xml.Serialization;
|
|
|
|
namespace MonoGame.Extended.Tiled.Serialization
|
|
{
|
|
[XmlRoot(ElementName = "map")]
|
|
public class TiledMapContent
|
|
{
|
|
public TiledMapContent()
|
|
{
|
|
Properties = new List<TiledMapPropertyContent>();
|
|
Tilesets = new List<TiledMapTilesetContent>();
|
|
Layers = new List<TiledMapLayerContent>();
|
|
}
|
|
|
|
[XmlIgnore]
|
|
public string Name { get; set; }
|
|
|
|
[XmlIgnore]
|
|
public string FilePath { get; set; }
|
|
|
|
[XmlAttribute(AttributeName = "version")]
|
|
public string Version { get; set; }
|
|
|
|
[XmlAttribute(AttributeName = "orientation")]
|
|
public TiledMapOrientationContent Orientation { get; set; }
|
|
|
|
[XmlAttribute(AttributeName = "renderorder")]
|
|
public TiledMapTileDrawOrderContent RenderOrder { get; set; }
|
|
|
|
[XmlAttribute(AttributeName = "backgroundcolor")]
|
|
public string BackgroundColor { get; set; }
|
|
|
|
[XmlAttribute(AttributeName = "width")]
|
|
public int Width { get; set; }
|
|
|
|
[XmlAttribute(AttributeName = "height")]
|
|
public int Height { get; set; }
|
|
|
|
[XmlAttribute(AttributeName = "tilewidth")]
|
|
public int TileWidth { get; set; }
|
|
|
|
[XmlAttribute(AttributeName = "tileheight")]
|
|
public int TileHeight { get; set; }
|
|
|
|
[XmlAttribute(AttributeName = "hexsidelength")]
|
|
public int HexSideLength { get; set; }
|
|
|
|
[XmlAttribute(AttributeName = "staggeraxis")]
|
|
public TiledMapStaggerAxisContent StaggerAxis { get; set; }
|
|
|
|
[XmlAttribute(AttributeName = "staggerindex")]
|
|
public TiledMapStaggerIndexContent StaggerIndex { get; set; }
|
|
|
|
[XmlElement(ElementName = "tileset")]
|
|
public List<TiledMapTilesetContent> Tilesets { get; set; }
|
|
|
|
[XmlElement(ElementName = "layer", Type = typeof(TiledMapTileLayerContent))]
|
|
[XmlElement(ElementName = "imagelayer", Type = typeof(TiledMapImageLayerContent))]
|
|
[XmlElement(ElementName = "objectgroup", Type = typeof(TiledMapObjectLayerContent))]
|
|
[XmlElement(ElementName = "group", Type = typeof(TiledMapGroupLayerContent))]
|
|
public List<TiledMapLayerContent> Layers { get; set; }
|
|
|
|
[XmlArray("properties")]
|
|
[XmlArrayItem("property")]
|
|
public List<TiledMapPropertyContent> Properties { get; set; }
|
|
}
|
|
} |