import greenfoot.*; public class Character extends Actor { double Force = 0; double Gravity = 0.5; double Boost_Speed = -6; int Wait = 0; public void act() { setLocation( getX(), (int)(getY() + Force) ); if(Greenfoot.isKeyDown("up")){ Wait++; Force = Boost_Speed; if(Wait >= 8) { setLocation( getX(), (int)(getY() + 1) ); Wait = 0; } } Force = Force + Gravity; } }

