I'm making a tower defense game and have an actor called towerRange which (as you might expect) is a circle indicating the range of the selected tower. It changes size depending upon what tower is selected, and all these size changes are severely pixelating it over time since I have to keep scaling it based on its previous size. I tried to fix this by setting its image to the image file each time before scaling, but the line doesn't seem to be having any effect. Could anyone tell me why and maybe recommend a fix?
All of the below is inside the act method.
Terrain1 world = (Terrain1)getWorld();
GreenfootImage image = getImage();
if(image.getWidth() != world.rangeSize * 2){ /*basically, if the actor's size needs to change to fit the range of the newly selected tower; if it needs to be resized */
setImage("Tower Range.png"); /*<--- the line that doesn't seem to be registering*/
image.scale(world.rangeSize * 2, world.rangeSize * 2);
setImage(image);
}
