为什么这个程度显示不出来,图像也不动啊?
Panda xiongmao1;
Panda xiongmao2;
Panda xiongmao3;
Panda xiongmao4;
void setup(){
size(600,600);
smooth();
xiongmao1=new Panda(100,100,100,color(random(360),100,100));
xiongmao2=new Panda(150,200,100,color(random(360),100,100));
xiongmao3=new Panda(160,300,100,color(random(360),100,100));
xiongmao4=new Panda(170,250,100,color(random(360),100,100));
}
void draw(){
background(255);
xiongmao1.dispaly();
xiongmao1.moveX();
xiongmao2.dispaly();
xiongmao2.moveX();
xiongmao3.dispaly();
xiongmao3.moveY();
xiongmao4.dispaly();
xiongmao4.moveY();
}
class Panda{
float x;
float y;
float xspeed;
float yspeed;
float d;
float s;
float c;
Panda(float tempx,float tempy,float tempd,color tempc){
x=tempx;
y=tempy;
d=tempd;
c=tempc;
xspeed=0.5;
s=1;
}
void dispaly(){
fill(0);
strokeWeight(2);
stroke(255);
ellipse(-70,-50,70,70);
ellipse(70,-50,70,70);
fill(255);
strokeWeight(2);
stroke(2);
ellipse(0,0,200,180);
fill(0);
ellipse(-50,10,60,70);
ellipse(50,10,60,70);
fill(255);
ellipse(-50,0,12,12);
ellipse(50,0,12,12);
fill(0);
ellipse(0,50,15,10);
noFill();
stroke(0);
strokeWeight(2);
bezier(-5,70,-5,75,5,75,5,70);}
void moveX(){
x=x+xspeed*s;
if(x>width+d){s-=s;}
}
void moveY(){
y=y+yspeed*s;
if(y>height+d){s-=s;}
}
}