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

2013/12/2

Remove

Andrej Andrej

2013/12/2

#
How i can remove both of two objects for examle a shoot and a meteor?
JasonZhu JasonZhu

2013/12/2

#
It depends on which class you are calling it from
danpost danpost

2013/12/2

#
The easiest way is to get a reference to the world before removing the objects:
World world = getWorld();
world.removeObject(this);
world.removeObject(collided);
I used 'collided' as the name of the Actor object of the "other" class.
You need to login to post a reply.