HI my friends.
I am trying to do a collision with 2 rectangles..
It works.. but I have a problem.
I have a ball going down.. and when it colides with a box.. I say go UP..
but it just stops there..
my logic is:
public class Collision {
private boolean check = false;
public void check(Player player, Ball ball){
if (!player.getPlayer().intersects(ball.getBall()) && check == false){
ball.moveDOWN();
ball.drawBall();
} else {
ball.moveUP();
ball.drawBall();
check = true;
}
}
}
dont know what is wrong.
Thank you