Hey,
i drew a few lines from point to point with this code (actor class):
Now i want to change the color of some lines in red but not all. So there are some red and white lines.
I tried this code here to change color in red:
but it says "incompatible types: java.awt.Color cannot be converted to greenfoot.Color".
And i tried this in my world class:
But in this case all lines change in red instantly, even though i drew the white lines before this method.
Can anyone tell me wich code i should use for drawing red lines without replacing the white ones?
getWorld().getBackground().drawLine(x1, y1, x2, y2);
getWorld().getBackground().setColor(new Color(255, 0, 0));
int r = 255; int g = 0; int b = 0; getBackground().setColor(new Color(r, g, b));