TiledMapTilesetTileContent.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 TiledMapTilesetTileContent
  8. {
  9. public TiledMapTilesetTileContent()
  10. {
  11. Properties = new List<TiledMapPropertyContent>();
  12. Type = string.Empty;
  13. }
  14. [XmlAttribute(AttributeName = "id")]
  15. public int LocalIdentifier { get; set; }
  16. [XmlAttribute(AttributeName = "type")]
  17. public string Type { get; set; }
  18. [XmlElement(ElementName = "image")]
  19. public TiledMapImageContent Image { get; set; }
  20. [XmlArray("objectgroup")]
  21. [XmlArrayItem("object")]
  22. public List<TiledMapObjectContent> Objects { get; set; }
  23. [XmlArray("animation")]
  24. [XmlArrayItem("frame")]
  25. public List<TiledMapTilesetTileAnimationFrameContent> Frames { get; set; }
  26. [XmlArray("properties")]
  27. [XmlArrayItem("property")]
  28. public List<TiledMapPropertyContent> Properties { get; set; }
  29. public override string ToString()
  30. {
  31. return LocalIdentifier.ToString();
  32. }
  33. }