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

2013/6/2

Will Not Recognize Any Classes In Greenfoot (for world.getObjects())

deiseigei deiseigei

2013/6/2

#
World worf = getWorld(); worf.removeObjects(worf.getObjects(null)); ^^ This is in one of my Classes, which is a subclass of Actor, and works. For some reason, when I change the method to a specific class (eg, Actor), I get this: "cannot find symbol - variable Actor" this is what it looks like in the code: World worf = getWorld(); worf.removeObjects(worf.getObjects(Actor)); and also I imported these: import greenfoot.*; import java.lang.Class; import java.lang.Object; import java.util.List; help much appreciated, thank you!
"Actor.class" not just Actor. That way greenfoot knows to look for classes of Actor.
deiseigei deiseigei

2013/6/2

#
OH MY GOSH thank you so much! how did i forget that :P
Your welcome. :)
You need to login to post a reply.