Advertisement
fosterbl

3 Bubble main with 100 bubbles

Jan 31st, 2020
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.28 KB | None | 0 0
  1. Bubble[] bubbles;
  2.  
  3. void setup(){
  4.   size(640,480);
  5.   bubbles = new Bubble[100];
  6.   for(int i = 0; i < 100; i++){
  7.     bubbles[i] = new Bubble();
  8.   }
  9. }
  10.  
  11. void draw(){
  12.   background(0);
  13.   for(int i = 0; i < 100; i++){
  14.     bubbles[i].ascend();
  15.     bubbles[i].display();
  16.   }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement