mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-24 20:12:23 +00:00
29 lines
727 B
C#
29 lines
727 B
C#
using System.Collections.Generic;
|
|
using System.Xml.Serialization;
|
|
|
|
namespace MonoGame.Extended.Tiled.Serialization
|
|
{
|
|
public class TiledMapPropertyContent
|
|
{
|
|
[XmlAttribute(AttributeName = "name")]
|
|
public string Name { get; set; }
|
|
|
|
[XmlAttribute(AttributeName = "value")]
|
|
public string ValueAttribute { get; set; }
|
|
|
|
[XmlText]
|
|
public string ValueBody { get; set; }
|
|
|
|
[XmlArray("properties")]
|
|
[XmlArrayItem("property")]
|
|
public List<TiledMapPropertyContent> Properties { get; set; }
|
|
|
|
public string Value => ValueAttribute ?? ValueBody;
|
|
|
|
public override string ToString()
|
|
{
|
|
return $"{Name}: {Value}";
|
|
}
|
|
}
|
|
}
|