class Enemy { float x; float y; float w; color col; float yspeed; Enemy() { this.x = random(width); this.y = random(-300)-30; this.w = 10; this.col = color(random(256), 0.0, 0.0); this.yspeed = random(1,5); } void move() { y += yspeed; if (y >= height) { y = random(height)-50*(-1); } x += random(-2,2); col = color(random(256),random(256),random(256)); } void paint() { ellipseMode(CENTER); stroke(col); fill(col); ellipse(x, y, w, w); } void reset() { x = random(width); y += yspeed; y = random(-100, -height); x += random(-2, 2); col = color(random(256),random(256),random(256)); w = random(10, 20); } }