summaryrefslogtreecommitdiff
path: root/Plugins/MonoGame.Extended/source/MonoGame.Extended.Tiled/TiledMapLayer.cs
blob: 6226dd12ff8d027df858481ab08e996a29fe7d25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using Microsoft.Xna.Framework;

namespace MonoGame.Extended.Tiled
{
    public abstract class TiledMapLayer
    {
        public string Name { get; }
        public string Type { get; }
        public bool IsVisible { get; set; }
        public float Opacity { get; set; }
        public Vector2 Offset { get; set; }
        public Vector2 ParallaxFactor { get; set; }
        public TiledMapProperties Properties { get; }

        protected TiledMapLayer(string name, string type, Vector2? offset = null, Vector2? parallaxFactor = null, float opacity = 1.0f, bool isVisible = true)
        {
            Name = name;
            Type = type;
            Offset = offset ?? Vector2.Zero;
            ParallaxFactor = parallaxFactor ?? Vector2.One;
            Opacity = opacity;
            IsVisible = isVisible;
            Properties = new TiledMapProperties();
        }
    }
}