Is there a way to use getWorld() to check if an object exists at a specific coordinate location?


1 2 3 4 | if (getX()==x && getY()==y) { //do something } |
1 2 3 4 5 6 7 8 9 10 | if (!getObjectsAt(x, y, null ).isEmpty()) { //do something } //or in case you want to execute the code in an Actor class if (!getWorld().getObjectsAt(x, y, null ).isEmpty()) { //do something } |