does anyone have a code to jump like i press the space bar and i jump but can jeep jumping in mid air and if i hit the bottom of the screen then i die so i need to keep jumping?
thanks if you can provide me with a code
if (Greenfoot.isKeyDown("up")) vSpeed--; else vSpeed++;
setLocation(getX(), getY()+vSpeed);
if (getY() == getWolrld().getHeight()-1) Greenfoot.stop(); // or whatever