class FixLight extends Light // FixLight erweitert die Klasse Light { ArrayList punkteListe; // Die FixLights müssen die punkteListe kennen int counter; // Unten brauche ich einen Counter FixLight(int xP, int yP, int xD, int yD, ArrayList punkteListe) { xPos = xP; // Startposition X yPos = yP; // Startposition Y xDim = xD; // Dimension in X-Richtung yDim = yD; // Dimension in Y-Richtung counter = 0; this.punkteListe = punkteListe; } void paintMe() // Hier gibts nur ein void paintMe(), weil sich die Fixleuchten nicht bewegen { noFill(); stroke(255,0,0); strokeWeight(0); rect(xPos,yPos,10,10); //rasterPosition[xPos/10][yPos/10] = N_FIX_LIGHT; ellipse(xPos+5,yPos+5,4,4); if (rasterPosition[xPos/10][yPos/10] == N_BIG_LIGHT) // Wenn die FixLeuchte in einem BigLight ist, Dann: { // Wird der Counter um 1 erhöht counter++; } else { rasterPosition[xPos/10][yPos/10] = N_FIX_LIGHT; } if (counter == 10) // Ist der Counter bei 10, so wird die zerstört >> Verzögerung { // ..explode(); wird aufgerufen explode(); } } //******************************************************************************** void explode() { for (int i=0; i