AnimationManagerUpdateAndApplyAnimation Method (IAnimatableProperty) |
Namespace: DigitalRune.Animation
Exception | Condition |
---|---|
ArgumentNullException | animatedObjects is . |
When an animations are started or stopped, the values of the animated properties do not change immediately. The new animation values will be computed and set when the animation system is updated. See Update(TimeSpan) and ApplyAnimations.
But in certain cases when animations are started or stopped the animated properties should be updated immediately. In these case the method UpdateAndApplyAnimation(IAnimatableProperty) (or one of its overloads) needs to be called after the animations are started or stopped. This method immediately evaluates the animations and applies the new animation values to the specified objects or properties.
The method can also be called if animations are modified (e.g. key frames are added or removed) and the changes should take effect immediately.
In most cases it is not necessary to call this method because the animation system updates and applies animations automatically.
Note that UpdateAndApplyAnimation(IAnimatableProperty) does not advance the time of the animations. The animations are evaluated at their current time.