I keep trying to figure out how to make my bird smoothly hop up but cant seem to figure it out. My idea below was to have a for loop continue to subtract 1 to the Y but it does it too quick. Maybe if i add a delay it'd work but im not exactly sure on how to do it. any suggestions or help would be appreciated
public void move()
{
if(Greenfoot.mouseClicked(null))
{
for(int i = 0; i<20; i++)
{
setLocation(getX(), getY()-3);
}
setRotation(-15);
}
else
{
setLocation(getX(), getY()+2);
setRotation(15);
}
}
