I have a fairly large and complicated game, not sure what this issue is but i'm getting a problem with one of my classes, most specifically this line of code here:
image.scale(image.getWidth() * pixToHeightRatio, image.getHeight() * pixToHeightRatio);
It all comes from this class here:
public Background(String startImage, int pixToHeightRatio, int startWorldWidth, int startWorldHeight)
{
setImage(startImage);
GreenfootImage image = getImage();
image.scale(image.getWidth() * pixToHeightRatio, image.getHeight() * pixToHeightRatio);
setImage(image);
}
This issue only happens occasionally when i hit 'reset'.