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

2013/2/26

how can i get one thing to destroy another?

dion.williams dion.williams

2013/2/26

#
hey guys I need to know how to destroy my space rocket if a rock hits please help me?
Game/maniac Game/maniac

2013/2/26

#
Put this in your act method for the rocket
Actor actor = getOneIntesectingObject(Rock.class);
if(actor != null){
    getWorld().removeObject(this);
}
dion.williams dion.williams

2013/2/27

#
thank you
Game/maniac Game/maniac

2013/2/27

#
Your welcome
You need to login to post a reply.