Im trying to make a Flappy bird but i can seem to get the bird to move up smoothly. Any advise?
thats what i have so far, it makes him go up for just one numAct then instantly goes back down. You wouldn't even notice it, its so quick.
int timer;
/**
* Act - do whatever the Bird wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()
{
move();
die();
//gameOver();
}
public void move()
{
if(Greenfoot.mouseClicked(null))
{
timer++;
if(timer < 100)
{
setLocation(getX(), getY()-100);
setRotation(-15);
}
}
else
{
setLocation(getX(), getY()+5);
setRotation(15);
}
}
