if anyone can please help me and tell me how to get the boy to slow down when he eats a pizza.
this is my first time using greenfoot and i have to deliver this game by the end of this week :/
i tried overriding move(), i used this :
public void move(int speed)
{
double angle = Math.toRadians( getRotation() );
int x = (int) Math.round(getX() + Math.cos(angle) * speed);
int y = (int) Math.round(getY() + Math.sin(angle) * speed);
setLocation(x, y);
}
and i set speed to be 2.0, but it is still going at the same speed, i'd really appreciate it if someone can help me out
Recent Comments
2012/5/29
CatchMe
2012/5/29
CatchMe