Files
MonoGame.Extended/Source/MonoGame.Extended.Content.Pipeline/Tiled/TmxLayer.cs
T
2015-08-15 23:15:28 +10:00

35 lines
909 B
C#

using System.Collections.Generic;
using System.Xml.Serialization;
namespace MonoGame.Extended.Content.Pipeline.Tiled
{
[XmlInclude(typeof(TmxTileLayer))]
[XmlInclude(typeof(TmxImageLayer))]
public abstract class TmxLayer
{
protected TmxLayer()
{
Opacity = 1.0f;
Visible = true;
Properties = new List<TmxProperty>();
}
public override string ToString()
{
return Name;
}
[XmlAttribute(AttributeName = "name")]
public string Name { get; set; }
[XmlAttribute(AttributeName = "opacity")]
public float Opacity { get; set; }
[XmlAttribute(AttributeName = "visible")]
public bool Visible { get; set; }
[XmlArray("properties")]
[XmlArrayItem("property")]
public List<TmxProperty> Properties { get; set; }
}
}