Advertisement
Guest User

Untitled

a guest
Aug 20th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. private boolean objectOnTile(int objectID, RSTile t) {
  2. RSObject[] arrayObjects = objects.getAllAt(t);
  3. for(int i = 0; i < arrayObjects.length; i++) {
  4. if(arrayObjects[i].equals(objects.getNearest(objectID))) {
  5. return true;
  6. }
  7. }
  8. return false;
  9. }
  10.  
  11. private void doActionOnTile(int objectID, RSTile t, String action) {
  12. RSObject[] arrayObjects = objects.getAllAt(t);
  13. for(int i = 0; i < arrayObjects.length; i++) {
  14. if(arrayObjects[i].equals(objects.getNearest(objectID))) {
  15. if(arrayObjects[i] != null) {
  16. arrayObjects[i].doAction(action);
  17. }
  18. }
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement