using Microsoft.Xna.Framework;
namespace MonoGame.Extended.Tilemaps
{
///
/// Represents a rectangular object in a tilemap.
///
public class TilemapRectangleObject : TilemapObject
{
///
/// Gets or sets the size of the rectangle.
///
public Vector2 Size { get; set; }
///
public override RectangleF Bounds
{
get
{
return new RectangleF(Position.X, Position.Y, Size.X, Size.Y);
}
}
// NOTE: Will use BoundingBox2D or OrientedBoundingBox2D
///
/// Initializes a new instance of the class.
///
/// The unique identifier for the object.
/// The position of the top-left corner.
/// The size of the rectangle.
public TilemapRectangleObject(int id, Vector2 position, Vector2 size) : base(id, position)
{
Size = size;
}
}
}