Hello to everyone
I am trying to make asteroids and i have a class Asteroids representing the rocks. I would like to know what is the difference between the commands below that change the size of the rocks
1) getImage().scale(x,y)
2) Asteroids image=getImage()
image.scale(x,y)
setImage(image)
Both ways change the visible size of the rocks but only the second way change the actual attributes: imageWidth, imageHeight of the Asteroids object. The first way sometimes gives me trouble when my spaceship gets near a rock: though is not touching the rock it explodes as if it had touched it. I assume it is relevant to how i scale the image of the rock with the first way but maybe i am wrong. I am looking forward for your suggestions