I need help with making my dog jump in a game, but I don't know how to make him move up and I don't how to make it delay before falling. Here is my code:
I need to make it in lines 6 through 9. The rest works properly, though.
/**
* Move - this allows the dog to move.
*/
public void move()
{
if (Greenfoot.isKeyDown("W"))
{
}
if (Greenfoot.isKeyDown("D"))
{
setImage("Unknown-7.png") ;
move(3) ;
}
if (Greenfoot.isKeyDown("A"))
{
setImage("Unknown-5.png") ;
move(-3) ;
}
}


