Im still not really sure why my code above didnt work, is it because it uses relative coordinates when im expecting it to use global coordinates (which I dont see a purpose for it to be limited to relative..that makes it useless as far as I can tell!)
But I found some code for collision testing under the French Wiki's Code Source section (no I dont know French but it was the only resource I could find since its still unclear why my above method wont work.)
Now I am once again having a similar problem.
mouseX = game.GetInput().GetMouseX();
mouseY = game.GetInput().GetMouseY();
for(int i = 0; i < 36; i++)
{
if(!tiles[i].GetSubRect().Contains(mouseX, mouseY))
game.Draw(tiles[i]);
}
If a mouse is over a tile, as a test I was expecting it to just not be drawn. But NO MATTER WHAT, that Contains method returns TRUE.
Can someone please tell me what I am doing wrong?
Thanks