if you catch the bug please fix it for me because i can't seem to find it.
Code: Select all
bool hitTest(object obj1, object obj2){
if((obj1.posx + obj1.width >= obj2.posx)&&
(obj1.posx <= obj2.posx + obj2.width)&&
(obj1.posy + obj1.height >= obj2.posy)&&
(obj1.posx <= obj2.posy + obj2.height))
return true;
else
return false;
}