Can someone show me a line for flipping an image when a is pressed, I designed a helicopter but when i have it rotate the other way, its upside down. Someone show me a line or example I would use, thats the easiest way I learn.
GreenfootImage img = getImage(); img.mirrorVertically(); setImage(img);
getImage().mirrorVertically();
if(Greenfoot.isKeyDown("a") && !isDown)
{
/**
*insert method for flipping picture
**/
isDown = true;
}
if(!Greenfoot.isKeyDown("a") && isDown)
{
isDown = false;
}if("a".equals(Greenfoot.getKey())if("a".equals(Greenfoot.getKey())
{
turn(180);
getImage().mirrorVertically();
// this last line gets the current image and 'flips' it
}