fosterbl

Processing boolean starter code

Sep 25th, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.38 KB | None | 0 0
  1. //Declare the x variable here so it can be used
  2. //it will be used to keep track of the x-position of the ellipse
  3. int x;
  4.  
  5. //This setup function occurs once at the very beginning of the program
  6. void setup(){
  7.   size(300,300);
  8.   x = 5;
  9. }
  10.  
  11. //This draw function is called many times a second
  12. void draw(){
  13.   background(0);
  14.   fill(128,128,128);
  15.   ellipse(x, 150, 50, 50);
  16.   x++;
  17. }
Add Comment
Please, Sign In to add comment