Hi guys.
Can someone please help me/write me the code to create a simple actor in a shape of a square, any colour, 60 by 60, because I don't get what it tells me to do in the documentation.
Thanks
GreenfootImage image; // for base image image = new GreenfootImage(60, 60); // create base image int red = Greenfoot.getRandomNumber(255); // random part for red int green = Greenfoot.getRandomNumber(255); // random part for green int blue = Greenfoot.getRandomNumber(255); // random part for blue Color color; // for random color color = new Color(red, green, blue); // create random color image.setColor(color); // set the color image.fill(); // paint image with set color setImage(image); // apply the image to the object
import java.awt.Color;