public void act() { if (Greenfoot.isKeyDown("left")) { setLocation(getX()-10, getY()); } if (Greenfoot.isKeyDown("right")) { setLocation(getX()+10, getY()); } if (Greenfoot.isKeyDown("up") && (onBlock32() == true)) { vSpeed = jumpHeight; fall(); } checkFalling(); animate(); }