| 12345678910111213141516171819202122232425262728293031323334 |
- using Microsoft.Xna.Framework;
- namespace MonoGame.Extended.Tilemaps
- {
- /// <summary>
- /// Represents a point object in a tilemap with no spatial extent.
- /// </summary>
- /// <remarks>
- /// Point objects are typically used as markers or spawn points and do not
- /// have collision volumes.
- /// </remarks>
- public class PointObject : TilemapObject
- {
- /// <inheritdoc/>
- public override RectangleF Bounds
- {
- get
- {
- return new(Position.X, Position.Y, 0, 0);
- }
- }
- // NOTE: Point objects have no bounding volume for collision detection
- /// <summary>
- /// Initializes a new instance of the <see cref="PointObject"/> class.
- /// </summary>
- /// <param name="id">The unique identifier for the object.</param>
- /// <param name="position">The position of the point.</param>
- public PointObject(int id, Vector2 position) : base(id, position)
- {
- }
- }
- }
|