예제 #1
0
 public void setSpeed(float speedKmh) {
   float distanceMeters = motionPath.getLength();
   float speed = speedKmh / 3.6f;
   float duration = distanceMeters / speed;
   motionControl.setInitialDuration(duration);
 }
예제 #2
0
 public float getSpeed() {
   float duration = motionControl.getInitialDuration();
   float distanceMeters = motionPath.getLength();
   float speed = distanceMeters / duration;
   return 3.6f * speed;
 }