int x=50;
int y=50;
void setup(){
size(500,500);
}
void draw(){
background(250,0,200);
ellipse(x,y,50,50);
}
void keyPressed(){
if(key=='w' || key=='W'){
y--;
} else if(key=='s' || key=='S'){
y++;
} else if(key=='a' || key=='A'){
x--;
} else if(key=='d' || key=='D'){
x++;
}
}
void mousePressed(){
fill (0);
}
No hay comentarios:
Publicar un comentario