FOOTSTEPS PAINT DOWNLOAD AND CODE
Code:
PImage Footstep2L, Footstep2R, Footstep3L, Footstep3R;
PImage current_image;
int counter;
void setup(){
size(800, 800);
background(0, 0, 0);
frameRate(60);
imageMode(CENTER);
//Loading images.
Footstep2L = loadImage("Footstep2-Left.png");
Footstep2R = loadImage("Footstep2-Right.png");
Footstep3L = loadImage("Footstep3-Left.png");
Footstep3R= loadImage("Footstep3-Right.png");
counter = 0;
current_image = Footstep2L;
}
void draw(){
if(mousePressed){
make_stroke();
}
}
void mousePressed(){
switch(counter){
case 0:
current_image = Footstep2L;
break;
case 1:
current_image = Footstep2R;
break;
case 2:
current_image = Footstep3L;
break;
case 3:
current_image = Footstep3R;
break;
}
counter = counter + 1;
if(counter > 3){
counter = 0;
}
}
void mouseReleased(){ }
void make_stroke(){
image(current_image, mouseX, mouseY);
}