int counter=25; int st; Wave wave1; Wave wave2; Wave wave3; Rain[] rains= new Rain[300]; void setup(){ size(800,800); st=millis(); wave1= new Wave(color(255,255,255,50),0.02,500); wave3= new Wave(color(255,255,255,30),0.05,700); wave2= new Wave(color(255,255,255),0.07,600); for(int i=0; i < rains.length; i++){ rains[i] = new Rain(random(width),random(-height),random(2,5),random(10,15)); } } void draw(){ background(0); wave1.up(); wave2.up(); wave3.up(); for(int i=0; i < counter; i++){ rains[i].down(); } if (counter>299){ counter=299; } if (millis()-st>3000){ counter=counter+1; st=millis(); } }