This site requires JavaScript, please enable it in your browser!
Greenfoot back
Beckninja
Beckninja wrote ...

2012/6/1

Costume Changing

Beckninja Beckninja

2012/6/1

#
Help, I have a project, but I want to make it so that the actor will change it's costume when it is touched by another actor. I already have the code: public void destroy_phone() { Actor Roomba; Roomba = getOneObjectAtOffset (0,0, Phone.class); if (Roomba != null) { World world; world = getWorld(); world.removeObject(Roomba); } } The thing is, when the Roomba is touching the Phone, I don't want the phone to get destroyed, I want it to change costumes so that it looks like it got destroyed, can somebody help me?
danpost danpost

2012/6/1

#
If you already have the image you want to use, just 'setImage("theImage.png")' after 'world.removeObject(Roomba);'.
Beckninja Beckninja

2012/6/1

#
Thank you sooo much!
You need to login to post a reply.