public class Person_Stadning extends Actor
{
boolean stand = false;
/**
* Act - do whatever the Person_Stadning wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()
{
if(Greenfoot.isKeyDown("right")== true)
{
setImage("person.2 walking right.png");
move(4);
}
if(Greenfoot.isKeyDown("left")== true)
{
setImage("person.2 Walking left.png");
move(-4);
}
if(Greenfoot.isKeyDown("left")== false)
{
setImage("person.2 Standing.png");
}
if(Greenfoot.isKeyDown("right")== false)
{
setImage("person.2 Standing.png");
}
}
}
