xxxxxxxxxx
39
var creeperGreen = [0,200,0];
var otherColor = [200,0,0];
var faceColor = [0,0,0];
var currentColor = creeperGreen;
function drawCreeper(){
drawHead();
drawBody();
drawFeet();
drawFace();
}
function drawHead() {
fill(currentColor);
rect(160, 20, 100, 100);
}
function drawBody() {
fill(currentColor);
rect(170, 120, 80, 150);
}
function drawFeet() {
fill(currentColor);
rect(145, 250, 40, 40);
rect(235, 250, 40, 40);
}
function drawFace() {
noStroke();
fill(faceColor);
rect(180, 40, 20, 20);
rect(220, 40, 20, 20);
rect(200, 60, 20, 10);
rect(190, 70, 40, 20);
rect(190, 90, 10, 10);
rect(220, 90, 10, 10);
rect(220, 90, 10, 10);
}