How do you check if an object is in a world? Not if its null, not if its in a class (it's already initialized in the class) but physically in the world with an x and y coordinate
The 'getWorld' method will return one of two things for an Actor object -- either the world the actor is in or 'null', if not in a world. So checking for 'null' will return a 'true' value if the actor is not in a world and checking for 'not null' will return 'true' if the actor is in a world: