Advertisement
Guest User

Untitled

a guest
Dec 16th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. int status = 0;
  2. int x = 0;
  3. void setup()
  4. {
  5. size(800, 800);
  6. textSize(32);
  7. }
  8. void draw()
  9. {
  10. if(keyPressed)
  11. {
  12. if(key=='a')
  13. {
  14. status = 1;
  15. }
  16. if(key=='b')
  17. {
  18. status =2;
  19. }
  20. }
  21.  
  22. if(status == 1)
  23. {
  24. background(233, 223, 176);
  25. text("linkiu graziu svenciu....", x, 100);
  26. x+=5;
  27. if(x>width)
  28. {
  29. x=-120;
  30. }
  31. }
  32. if(status ==2)
  33. {
  34. background(0, 23, 236);
  35. for(int i = 50; i< height; i+=50)
  36. {
  37. if(i%100==0) fill(0, 0, 255);
  38. else fill(0, 255, 0);
  39. text("linkiu graziu svenciu....", x, i);
  40. }
  41. x+=5;
  42. if(x>width)
  43. {
  44. x = -120;
  45. }
  46. }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement