Description
This page is generated from the Processing project folder at /2016/ASSIGNMENTS/A-05 Programming in Processing/assignment_05_mission_07/assignment_05_mission_07.pde.
Archive
No companion assets were found in this sketch folder.
int xPup1 = 135;
int xPup2 = 165;
int EyeSpd = -1;
void setup() {
size (300,400);
background (#AAEBF7);
}
void draw() {
background (#AAEBF7);
strokeWeight(3);
// Head
fill(#FF820D);
stroke(#C46710);
ellipse(150,200,100,100);
// Eyes
// Left Eye (Green)
fill(#,127);
stroke(#);
ellipse(135,185,40,40);
// Right Eye (Blue)
fill(#,127);
stroke(#);
ellipse(165,185,40,40);
// Pupil (Left)
fill(#363434);
stroke(#);
ellipse(xPup1,185,10,10);
// Pupil (Right)
fill(#363434);
stroke(#);
ellipse(xPup2,185,10,10);
// Nose
fill(#FF0307,127);
stroke(#D30206);
rect(145,195,10,20);
// Mouth
fill(#363434);
stroke(#);
ellipse(150,230,40,15);
// Movement
xPup1 += EyeSpd;
xPup2 += EyeSpd;
// Bounce
if (xPup1 < 120 || xPup1 > 150) {
EyeSpd = -1*EyeSpd;
}
} This page is generated from the Processing project folder at /2016/ASSIGNMENTS/A-05 Programming in Processing/assignment_05_mission_07/assignment_05_mission_07.pde.
No companion assets were found in this sketch folder.