I am trying to rotate a car in order to drive the other direction. Here is my code so far,
The getImage is the part I was trying to do to make it rotate but it needs the variable getImage, what do I need to add this variable or is there a better way to do this?
public static int direction;
public void act()
{
if (atWorldEdge())
{
if(direction <0)
{
setLocation(605, getY());
}
else
{
setLocation(20, getY());
}
}
move(7);
}
public CarBlue(boolean d){
if(d)
getImage.mirrorVertically();
turn(180);
}
