You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

20 lines
433 B

function Human(x, h, v){
this.x = x;
this.height = h;
this.male = random([true, false]);
this.legDist = 0;
this.v = v;
this.move = function(d){
this.x += this.v * d;
}
this.show = function(){
var y = ground[this.x];
stroke(0);
fill(0);
strokeWeight(1);
line(this.x, y - this.height * 0.4, this.x, y - this.height * 0.85);
ellipse(this.x, y - this.height * 0.925, this.height * 0.1, this.height * 0.15);
}
}