TiledMapObjectLayerContent.cs 894 B

1234567891011121314151617181920212223242526272829303132
  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. using MonoGame.Extended.Tiled;
  7. namespace MonoGame.Extended.Content.Tiled;
  8. public class TiledMapObjectLayerContent : TiledMapLayerContent
  9. {
  10. public TiledMapObjectLayerContent()
  11. : base(TiledMapLayerType.ObjectLayer)
  12. {
  13. Objects = new List<TiledMapObjectContent>();
  14. }
  15. [XmlAttribute(AttributeName = "color")]
  16. public string Color { get; set; }
  17. [XmlElement(ElementName = "object")]
  18. public List<TiledMapObjectContent> Objects { get; set; }
  19. [XmlAttribute(AttributeName = "draworder")]
  20. public TiledMapObjectDrawOrderContent DrawOrder { get; set; }
  21. public override string ToString()
  22. {
  23. return Name;
  24. }
  25. }