I need to know when the rocket hit the meteor, img2 is the meteor and img is the rocket
g.drawImage(img, posX - img.getWidth(this)/2, posY - img.getHeight(this), this);
g.drawImage(img2,posX1 - img2.getWidth(this), posY1 - img2.getHeight(this),this);
System.out.println(posY-img.getWidth(this));
System.out.println(posY1);
}
public void colid (){
if (posY1+img.getWidth(this)>= posY-img2.getWidth(this) ){
System.out.println("teste");
}