xxxxxxxxxx
25
let bubbles= [];
function setup() {
createCanvas(600, 400);
for(let i =0; i<10; i++){
bubbles[i] = new Bubble(10*i,100+i,i,i-3);
}
}
function draw() {
background(0);
for(let i =0; i<bubbles.length; i++){
bubbles[i].move();
bubbles[i].bounce();
bubbles[i].show();
}
}