class Zoog { // zoog float x; float y; float w; float h; float eyeSize; float speed = 1; // float mouseX; Zoog() { x = 100; y = 330; w = 60; h = 60; eyeSize = 16; speed = 1; } void move(float x_) { x = x_; } void display() { // Set ellipses and rects to CENTER mode ellipseMode(CENTER); rectMode(CENTER); noStroke(); // no shape outlines // Draw zoog's body fill(150); rect(x,y,w/6,h*2); // Draw zoog's head fill(255); ellipse(x,y-h/2,w,h); // Draw zoog's eyes fill(0); ellipse(x-w/3,y-h/2,eyeSize,eyeSize*2); ellipse(x+w/3,y-h/2,eyeSize,eyeSize*2); // Draw zoog's legs stroke(150); line(x-w/12,y+h,x-w/4,y+h+10); line(x+w/12,y+h,x+w/4,y+h+10); // Draw zoog's arms with a for loop for (float i = y+5; i < y+h; i+=10) { stroke(150); line(x-w/3,i,x+w/3,i); } } }