diff options
author | ricardolpd <[email protected]> | 2012-11-25 23:53:41 +0000 |
---|---|---|
committer | ricardolpd <[email protected]> | 2012-11-25 23:53:41 +0000 |
commit | 103369aca26c829045125138f1eea7de7bef9472 (patch) | |
tree | e9c7620a94eb60599907d021503f7b6e46a79476 /trunk | |
parent | 565f3f5061d4f3b80258efacfbc63e326012f313 (diff) |
-Fixed issue with boolean return in updateLayersForAnimationState since deciding the state of ManagedControlSource objects is bad idea since it gets update somewhere else.
Diffstat (limited to 'trunk')
-rw-r--r-- | trunk/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/AnimationManager.java | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/trunk/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/AnimationManager.java b/trunk/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/AnimationManager.java index 52c8604..2bd7ad9 100644 --- a/trunk/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/AnimationManager.java +++ b/trunk/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/AnimationManager.java @@ -245,9 +245,8 @@ public class AnimationManager { } // update animationState - if (!updateLayersForAnimationState(globalTime)) { - return; - } + updateLayersForAnimationState(globalTime); + // move the time forward on the layers for (int i = 0; i < _layers.size(); ++i) { @@ -284,33 +283,25 @@ public class AnimationManager { * current global time in seconds * @return */ - protected boolean updateLayersForAnimationState(final double globalTime) { - boolean canUpdate = false; + protected void updateLayersForAnimationState(final double globalTime) { + final Collection<AnimationClipInstance> clipInstances = _clipInstances.values(); - if (clipInstances.isEmpty()) { - return _currentAnimationState == AnimationUpdateState.play ? true : false; - } for (final AnimationClipInstance instance : clipInstances) { switch (_currentAnimationState) { case stop: instance.setActive(false); - canUpdate = true; break; case pause: if (instance.isActive()) { final double startTime = globalTime - instance.getCurrentTime() / instance.getTimeScale(); instance.setStartTime(startTime); } - canUpdate = true; break; case play: instance.setActive(true); - // do nothing - canUpdate = true; break; } } - return canUpdate; } /** |