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

2018/2/20

remove won't work fuck!

Dr.Dre Dr.Dre

2018/2/20

#
In my scenario I have an actor "rocket". And in this "rocket there is an integer. And if this integer is over 100 it activates a shoot function and another object is added (which is just a "Shoot" sign). But if this integer is under 100 I want to remove this object but it won't work. I put it like this: private void remove() { if(laden<100) { getWorld().removeObject(shoot.class); } }
danpost danpost

2018/2/20

#
Try:
getWorld().removeObjects(getWorld().getObjects(shoot.class));
You need to login to post a reply.