public class Collision {
public class Collision {
static boolean isColliding = false;
static Rectangle player;
static Rectangle female;
public static void collision(){
Rectangle player = Game.Playerbounds();
Rectangle female = Game.Femalebounds();
if(player.intersects(female)){
isColliding = true;
}else{
isColliding = false;
}
}
}
The code works partially. Only the right and top side of the images collide. How do I correct the rectangle so it will draw on all sides? Thanks for any suggestions!