Plant[] c = new Plant[10]; int ix = 30; int space=120; int fadeCounter = 0; void setup() { size(900,400); background(255); stroke(117,250,3,80); for(int i=0;i<10;i++) { c[i] = new Plant(ix,400); c[i].init(); ix=ix+space; } // background(255); framerate(30); } void draw() { // fade // println(fadeCounter+ "=="+ fadeCounter++%60); if(fadeCounter++%60==0) { noStroke(); fill(150,150,150,10); rect(0,0,width,height); stroke(130,255,30,80); fill(236,242,227); } for(int i=0;i<10;i++) { for(int j=0;j<1;j++) { c[i].run(); } } }