xxxxxxxxxx
24
// pulo
var estaPulando = false;
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
if (keyIsDown(UP_ARROW) && ! estaPulando ){
y = y - 120;
estaPulando = true;
}
if ( estaPulando ) {
if ( y < yChao) {
y = y + 12;
}
else {
y = yChao;
estaPulando = false;
}
}
}