class Orb { float x, y, w, h, s; color c; //creating a constructor to give the ball variables for x,y,width,height,speed and color Orb(float tempX, float tempY, float tempW, float tempH, float tempS, color tempC) { x = tempX; y = tempY; w = tempW; h = tempH; s = tempS; c = tempC; } void display() { fill(c); noStroke(); smooth(); ellipseMode(CENTER); ellipse(x, y, w, w); // tells the ball to follow the mouse if(this.x > mouseX) { this.x = this.x - s; } if(this.x < mouseX) { this.x = this.x + s; } if(this.y > mouseY) { this.y = this.y - s; } if(this.y < mouseY) { this.y = this.y + s; } } }