Advertisement
BlagovestHristov

Blago project

Dec 11th, 2019
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. PImage h;
  2. PImage e;
  3. PImage d;
  4. int x;
  5. int c;
  6. boolean m;
  7. boolean f;
  8. void setup() {
  9. h=loadImage("h.jpg");
  10. e=loadImage("e.jpg");
  11. d=loadImage("d.jpg");
  12. size(600,800);
  13. }
  14. void draw() {
  15. image(d,0,0);
  16. println(f);
  17. textSize(34);
  18. text("Merry Christmas",200,390);
  19. image(h,x,0);
  20. image(e,x,400);
  21. if(x+200==600){
  22. m=true;
  23. }
  24. if(x==0){
  25. m=false;
  26. }
  27. if(m==true){
  28. x=x-1;
  29.  
  30. }
  31. if(m==false){
  32. x=x+1;
  33. }
  34. if(f==true){
  35. fill(#670A15);
  36. }
  37. if(f==false){
  38. fill(#34670A);
  39. }
  40. }
  41. void mousePressed() {
  42. f=!f;
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement