Cinematic : AnimationTrack takes now the animation's duration as default duration

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8966 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
rem..om 13 years ago
parent 93a181b4c7
commit f3675227e0
  1. 2
      engine/src/core/com/jme3/cinematic/events/AnimationTrack.java

@ -63,6 +63,7 @@ public class AnimationTrack extends AbstractCinematicEvent {
public AnimationTrack(Spatial model, String animationName) {
modelName = model.getName();
this.animationName = animationName;
initialDuration = model.getControl(AnimControl.class).getAnimationLength(animationName);
}
public AnimationTrack(Spatial model, String animationName, float initialDuration) {
@ -73,6 +74,7 @@ public class AnimationTrack extends AbstractCinematicEvent {
public AnimationTrack(Spatial model, String animationName, LoopMode loopMode) {
super(loopMode);
initialDuration = model.getControl(AnimControl.class).getAnimationLength(animationName);
modelName = model.getName();
this.animationName = animationName;
}

Loading…
Cancel
Save