Title pretty much sums up my question. I am having a difficult time with 2D collision, so I thought it would be easier to actually see the bounding boxes I am using. That way, I can see if it intersects with my other bounding box. I'm checking for a player sprite and a set of spikes sprite. I want to see the bounding boxes. Is there any relatively simple way to do this (Emphasis on the simple, as I am quite new to XNA)? Any help is appreciated, thanks!
Here is some sample code for my collision method...
protected bool Collide()
{
if (!isRolling)
{
playerRect = new Rectangle((int)pos.X, (int)pos.Y, size.X, size.Y);
spikesRect = new Rectangle((int)pos2.X, (int)pos2.Y, 65, 80);
return playerRect.Intersects(spikesRect);
}
else
{
playerRect = new Rectangle((int)pos.X, (int)pos.Y + offset, 5, 5);
spikesRect = new Rectangle((int)pos2.X, (int)pos2.Y, 65, 80);
return playerRect.Intersects(spikesRect);
}
}
So I need to draw playerRect and spikesRect to the screen.