Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PImage h;
- PImage e;
- PImage d;
- int x;
- int c;
- boolean m;
- boolean f;
- void setup() {
- h=loadImage("h.jpg");
- e=loadImage("e.jpg");
- d=loadImage("d.jpg");
- size(600,800);
- }
- void draw() {
- image(d,0,0);
- println(f);
- textSize(34);
- text("Merry Christmas",200,390);
- image(h,x,0);
- image(e,x,400);
- if(x+200==600){
- m=true;
- }
- if(x==0){
- m=false;
- }
- if(m==true){
- x=x-1;
- }
- if(m==false){
- x=x+1;
- }
- if(f==true){
- fill(#670A15);
- }
- if(f==false){
- fill(#34670A);
- }
- }
- void mousePressed() {
- f=!f;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement