Saw an example of this in a tutorial but I forgot how to write it.


1 | if (getObjectsAt(getWidth()/ 2 , getHeight()/ 2 , Information. class ).isEmpty()) ... |
1 2 3 4 | java.util.List<Information> list = getObjectsAt(getWidth()/ 2 , getHeight()/ 2 ), Information. class ); // getting list of actors of given type at location if ( ! list.isEmpty() ) { Information info = list.get( 0 ); // getting a reference to the actor ... |