|
|
|
@ -69,13 +69,11 @@ public class MotionTrack extends AbstractCinematicEvent implements Control { |
|
|
|
|
protected Direction directionType = Direction.None; |
|
|
|
|
protected MotionPath path; |
|
|
|
|
private boolean isControl = true; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* the distance traveled by the spatial on the path |
|
|
|
|
*/ |
|
|
|
|
protected float traveledDistance = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Enum for the different type of target direction behavior |
|
|
|
|
*/ |
|
|
|
@ -203,8 +201,6 @@ public class MotionTrack extends AbstractCinematicEvent implements Control { |
|
|
|
|
vars.release(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void onUpdate(float tpf) { |
|
|
|
|
traveledDistance = path.interpolatePath(time, this); |
|
|
|
|
computeTargetDirection(); |
|
|
|
@ -434,7 +430,11 @@ public class MotionTrack extends AbstractCinematicEvent implements Control { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void setEnabled(boolean enabled) { |
|
|
|
|
if (enabled) { |
|
|
|
|
play(); |
|
|
|
|
} else { |
|
|
|
|
pause(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public boolean isEnabled() { |
|
|
|
@ -459,6 +459,4 @@ public class MotionTrack extends AbstractCinematicEvent implements Control { |
|
|
|
|
public float getTraveledDistance() { |
|
|
|
|
return traveledDistance; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|