I want to add a black screen over my game, where parts, I was will be discovered. I already managed to create the black screen, but I don't know, how I can clear Parts of the black Image now.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | public class Dunkelheit extends Actor { public Dunkelheit( int breite, int hoehe) { GreenfootImage Dunkelheit = new GreenfootImage(breite,hoehe); Dunkelheit.setColor(Color.BLACK); Dunkelheit.fill(); setImage(Dunkelheit); } public void act() { } public void quadratLoeschen( int x, int y, int laenge) { // Here should a square be deleted on position x,y with the side-length laenge } |