This is how to make the objects move or do something by using functions:
This is a function:
void drawCircle(){
noStroke ();
fill (0, 150, 255);
ellipse (x, y, 50, 50);
}
This is how to declare the function:
void draw() {
background(150, 40, 100);
** drawCircle(); **
moveCircle();
checkCollisions();
}
Particles: we were taught how to make particles.
The mouseX and mouseY, allows for the particles to come out of and move with the movement of the mouse.
By changing a few of the elements, for example the gravity function, which is:
gravity = 0.5;
I can change which direction the bubbles will go.
shrink = 0.95; And this allows me to make the bubbles either grow or shrink as they go away from the mouse or point at which I place them.