Is there a way to rotate a gif when creating player movement?
public void move()
{
int x = getX();
int y = getY();
if(Greenfoot.isKeyDown("D"))
{
setRotation(0);
x+=STEP;
}
if(Greenfoot.isKeyDown("A"))
{
setRotation(180);
Idle.getCurrentImage().mirrorVertically();
x-=STEP;
}
setLocation(x, y);
}