Exemple #1
0
 public double getRangeToTarget() {
   Vector3 targetPos = target != null ? target.getPosition() : staticTarget;
   return targetPos.distance(getPosition());
 }
Exemple #2
0
 public int getTimeToTarget() {
   Vector3 targetPos = target != null ? target.getPosition() : staticTarget;
   return (int) Math.round(targetPos.distance(getPosition()) / this.getClosingSpeed());
 }