int x = 0; int y = 400; int speed = 10; int gravity = 1; boolean boolvariable = false; void setup() { background(190,190,190); size(500,500); }
void draw() { background(190,190,190); rect (x,y,50,50); if (speed == - 11) { boolvariable = false; speed = 10; }
if (boolvariable) { x+=1; y-=speed; speed -= gravity; }
} void keyPressed() { if (key == ' ') { boolvariable = true;
} }