public void goPath(Timer timer) {
   update(timer);
   if (position.equals(target) && (pCount == p.getLength() - 1)) {
     pathing = false;
   } else if (position.equals(target)) {
     pCount++;
     target.set(p.getX(pCount), p.getY(pCount));
   }
 }
 public void setPath(Path p) {
   pCount = 0;
   this.p = p;
   target.set(p.getX(pCount), p.getY(pCount));
   pathing = true;
 }