class Shower { float xpos; float ypos; float showerSize; float speed; Shower(){ xpos = random(0,width); ypos = -100; showerSize = random(0,33); speed = random(1,10); } void move(){ ypos += speed; } //Check if it hits the bottom boolean rechedbottom() { if(ypos>height){ return true; } else{ return false; } } void display(){ fill(0,random(5,15)); float f1 = 0.0; beginShape(POLYGON); while(f1 < TWO_PI) { vertex(xpos + cos(f1)*(27-showerSize) + random(0,5), ypos + sin(f1)*(27-showerSize) + random(0,5)); f1 += PI/12.0; } endShape(); } }