TiledMapTileLayerDataContent.cs 963 B

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright (c) Craftwork Games. All rights reserved.
  2. // Licensed under the MIT license.
  3. // See LICENSE file in the project root for full license information.
  4. using System.Collections.Generic;
  5. using System.Xml.Serialization;
  6. namespace MonoGame.Extended.Content.Tiled;
  7. public class TiledMapTileLayerDataContent
  8. {
  9. public TiledMapTileLayerDataContent()
  10. {
  11. Tiles = new List<TiledMapTileContent>();
  12. }
  13. [XmlAttribute(AttributeName = "encoding")]
  14. public string Encoding { get; set; }
  15. [XmlAttribute(AttributeName = "compression")]
  16. public string Compression { get; set; }
  17. [XmlElement(ElementName = "tile")]
  18. public List<TiledMapTileContent> Tiles { get; set; }
  19. [XmlElement(ElementName = "chunk")]
  20. public List<TiledMapTileLayerDataChunkContent> Chunks { get; set; }
  21. [XmlText]
  22. public string Value { get; set; }
  23. public override string ToString()
  24. {
  25. return $"{Encoding} {Compression}";
  26. }
  27. }