Guest User

Untitled

a guest
Jan 23rd, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. private GameObject getSecondNearest(final GameObject curRock,
  2. final int... ids) {
  3. return Objects.getNearest(new Filter<GameObject>() {
  4.  
  5. @Override
  6. public boolean accept(GameObject o) {
  7. if (curRock != null) {
  8. if (curRock.equals(o)) {
  9. return false;
  10. }
  11. for (int id : ids) {
  12. if (o.getId() == id) {
  13. return true;
  14. }
  15. }
  16. }
  17. return false;
  18. }
  19. });
  20. }
Add Comment
Please, Sign In to add comment