I was wondering if anyone could help me with how to change an image based off of certain actions... My project is to turn one image into another after hitting a certain block on the world.
I ran into this code:
but I'm not sure what that really means and or how I can adjust this to change from Man1 to Man2.
Hopefully this isn't too confusing. Haha
public Man()
{
Man1 = new GreenfootImage("Man1");
Man2 = new GreenfootImage("Man2");
}
private boolean normalMan()
{
setImage(Man1);
}
private boolean manOnFire()
{
setImage(Man2);
}
