using Microsoft.Xna.Framework;
namespace MonoGame.Extended.Tilemaps
{
///
/// Base class for all tilemap objects
///
public abstract class TilemapObject
{
///
/// Gets the unique identifier for this object.
///
public int Id { get; }
///
/// Gets or sets the name of the object.
///
public string Name { get; set; } = string.Empty;
///
/// Gets or sets the class/type identifier for the object.
///
public string Class { get; set; } = string.Empty;
///
/// Gets or sets the position of the object in world coordinates.
///
public Vector2 Position { get; set; }
///
/// Gets or sets the rotation of the object in radians.
///
public float Rotation { get; set; }
///
/// Gets or sets a value indicating whether the object is visible.
///
public bool IsVisible { get; set; }
///
/// Gets the custom properties of the object.
///
public TilemapProperties Properties { get; }
///
/// Gets the axis-aligned bounding rectangle that encloses the object.
///
public abstract RectangleF Bounds { get; }
// TODO: BoundingVolume property will be added when IBoundingVolume2D is integrated
// public abstract IBoundingVolume2D BoundingVolume {get;}
protected TilemapObject(int id, Vector2 position)
{
Id = id;
Position = position;
IsVisible = true;
Properties = new TilemapProperties();
}
}
}