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

2012/11/14

addObject

actinium actinium

2012/11/14

#
Imagine i create a game level using the addObject method like so
addObject(new Floor(),x,y);
If i call the sub world to draw the level again will i write the new level over the top of the old level or will the old objects be removed from the heap.
SPower SPower

2012/11/14

#
What do you mean by:
sub world
SPower SPower

2012/11/14

#
And what code will get executed when you call it to draw the level again?
actinium actinium

2012/11/14

#
its ok i found a way to simply remove all the objects before drawing a new level using
removeObjects(getObjects(null));
Thanks anyway SPower
You need to login to post a reply.