Advertisement
Guest User

Untitled

a guest
Jul 24th, 2014
323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. in your loop somewhere put.
  2. ​ path = PathFinding.generatePath(Player.getPosition(),Game.getDestination(),false);
  3.  
  4. @Override
  5. public void onPaint(Graphics g) {
  6.  
  7. Graphics2D g2d = (Graphics2D) g;
  8. if(path != null && path.length > 0){
  9.  
  10. for(RSTile tile : path){
  11.  
  12. if(tile.isOnScreen()){g2d.draw(Projection.getTileBoundsPoly(tile, 0));}
  13.  
  14. }
  15.  
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement