Hi there,
I'm having problems with the setTransparency function.
When I call to an actor, I need apply transparency to the World background. I have tried this: (Actor code):
public class menu_if_else extends menu
{
private int transparencia = 255;
public void act()
{
if (transparencia > 128){
GreenfootImage imagen = getWorld().getBackground();
imagen.setTransparency(transparencia);
transparencia = transparencia -1;
System.out.println("Actual transparency: " + imagen.getTransparency());
getWorld().setBackground(imagen);
}
}
}
But I don't get any result,, hovewer in the log I see the correct values for the "transparencia" variable. I 'am forgetting something else?
Thanks in advance.
Regards,
Juan.