Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. // Rectangle starts at location x
  2. float x = 0;
  3. void setup() {
  4. size(200, 200);
  5. }
  6. void draw() {
  7. background(255);
  8. // Display object
  9. fill(0);
  10. rect(x, 100, 20, 20);
  11. // Increment x
  12. if (x<100) {
  13. x = x + 1;
  14. } else {
  15. x = 100;
  16. }
  17. println(x);
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement