TiledMapImageLayer.cs 646 B

123456789101112131415161718
  1. using Microsoft.Xna.Framework;
  2. using Microsoft.Xna.Framework.Graphics;
  3. namespace MonoGame.Extended.Tiled
  4. {
  5. public class TiledMapImageLayer : TiledMapLayer, IMovable
  6. {
  7. public TiledMapImageLayer(string name, string type, Texture2D image, Vector2? position = null, Vector2? offset = null, Vector2? parallaxFactor = null, float opacity = 1.0f, bool isVisible = true)
  8. : base(name, type, offset, parallaxFactor, opacity, isVisible)
  9. {
  10. Image = image;
  11. Position = position ?? Vector2.Zero;
  12. }
  13. public Texture2D Image { get; }
  14. public Vector2 Position { get; set; }
  15. }
  16. }