wowlikon-IT_platformer/Bot.pde
//Робот
void bot(int x, int y, int bodyHeight, int radius, float neckHeight){
pushMatrix();
  if(direction == 1){
    scale(1, 1) ;
  x = abs(x);
}else{
  scale(-1, 1);
  x = -x;
}
float ny = y - bodyHeight - neckHeight - radius;
  
//шея
stroke(102);
line(x + 2, y - bodyHeight, x + 2, ny);
line(x + 12, y - bodyHeight, x + 12, ny);
line(x + 22, y - bodyHeight, x + 22, ny);

//антенны
line(x + 12, ny, x - 18, ny - 43);
line(x + 12, ny, x + 42, ny - 99);
line(x + 12, ny, x + 78, ny + 15);

//туловище
fill(102);
stroke(10);
ellipse(x, y - 33, 33, 33);
stroke(102);
noStroke();
fill(0);
rect(x-45, y  - bodyHeight, 90, bodyHeight - 33);
fill(102);
rect(x-45, y  - bodyHeight + 17, 90, 6);

//голова
fill(0);
ellipse(x + 12, ny, radius, radius);
fill(255);
ellipse(x + 24, ny - 6, 14, 14);
fill(0);
ellipse(x + 24, ny - 6, 3, 3);
fill(153);
ellipse(x, ny - 8, 5, 5);
ellipse(x + 30, ny - 26, 4, 4);
ellipse(x + 41, ny + 6, 3, 3);

  scale(1, 1);
  x = abs(x);
 popMatrix();
}
