Class BaseLayer
- Namespace
- DotTiled
- Assembly
- DotTiled.dll
Base class for all layer types in a map. To check the type of a layer, use C# pattern matching, or some other mechanism to determine the type of the layer at runtime.
public abstract class BaseLayer : HasPropertiesBase, IHasProperties
- Inheritance
-
BaseLayer
- Implements
- Derived
- Inherited Members
Properties
Class
The class of the layer.
public string Class { get; set; }
Property Value
ID
Unique ID of the layer. Each layer that is added to a map gets a unique ID. Even if a layer is deleted, no layer ever gets the same ID.
public required uint ID { get; set; }
Property Value
Name
The name of the layer.
public string Name { get; set; }
Property Value
OffsetX
Horizontal offset for this layer in pixels.
public float OffsetX { get; set; }
Property Value
OffsetY
Vertical offset for this layer in pixels.
public float OffsetY { get; set; }
Property Value
Opacity
The opacity of the layer as a value from 0 (fully transparent) to 1 (fully opaque).
public float Opacity { get; set; }
Property Value
ParallaxX
Horizontal parallax factor for this layer.
public float ParallaxX { get; set; }
Property Value
ParallaxY
Vertical parallax factor for this layer.
public float ParallaxY { get; set; }
Property Value
Properties
Layer properties.
public List<IProperty> Properties { get; set; }
Property Value
TintColor
A tint color that is multiplied with any tiles drawn by this layer.
public Optional<Color> TintColor { get; set; }
Property Value
Visible
Whether the layer is shown (true) or hidden (false).
public bool Visible { get; set; }
Property Value
Methods
GetProperties()
The properties attached to the object.
public override IList<IProperty> GetProperties()