class Balloon { float x,y; float w, h; float s; float wide=0.7; color c; boolean cosine; Balloon() { this(0.1+random(0.45)); } Balloon(float _s) { s = _s; x = random(width); y = height+random(height); w = s*width*wide; h = s*height; c = color(random(100,255), random(100,255), random(100,255)); if(random(2)>1) cosine=true; else cosine=false; } void exist() { ellipseMode(CORNER); fill(c); stroke(0); strokeWeight(2); ellipse(x, y, w, h); triangle( x+w/2, y+h, x+w/2+5, y+h+5, x+w/2-5, y+h+5); y-=1; if(cosine) x+=cos(radians(millis()/8.0))*4.0*s; else x+=sin(radians(millis()/8.0))*4.0*s; x+=xAlter; x = constrain(x, 0-w/2, width-w/2); y +=yAlter; } boolean checkOver(int mx, int my) { if(mx>x && mxy && my