mirror of
https://github.com/TheRavenwoodArts/LunaLightXMG.git
synced 2026-07-31 00:55:03 -07:00
24 lines
548 B
C#
24 lines
548 B
C#
using Microsoft.Xna.Framework;
|
|
|
|
namespace LunaLightXMG
|
|
{
|
|
public class BoundingBox
|
|
{
|
|
public Rectangle Bounds { get; private set; }
|
|
|
|
public BoundingBox(Rectangle bounds)
|
|
{
|
|
Bounds = bounds;
|
|
}
|
|
|
|
public bool Intersects(BoundingBox other)
|
|
{
|
|
return Bounds.Intersects(other.Bounds);
|
|
}
|
|
|
|
public void Update(Vector2 position, int width, int height)
|
|
{
|
|
Bounds = new Rectangle((int)position.X, (int)position.Y, width, height);
|
|
}
|
|
}
|
|
} |