I want my background image to be greenish under certain conditions. Here's my code (MyWorld class):
What it does is every act it draws a new translucent green layer on top of the background image, but doesn't remove the old one, so the background becomes completely green after a few acts.
Any ideas?
public void greenBg()
{
GreenfootImage image = new GreenfootImage(getWidth(), getHeight());
int alpha = 50;
Color color = new Color(0, 255, 0, alpha);
image.setColor(color);
image.fill();
getBackground().drawImage(image, 0, 0);
}

