+
+ if ( mSpeedFactor < 0.0f && mElapsedSeconds <= mPlayRange.x*mDurationSeconds )
+ {
+ mElapsedSeconds = mPlayRange.y * mDurationSeconds;
+ }
+
+ SetAnimatorsActive( true );
+
+ mCurrentLoop = 0;
+}
+
+void Animation::PlayFrom( float progress )
+{
+ // If the animation is already playing this has no effect
+ // Progress is guaranteed to be in range.
+ if( mState != Playing )
+ {
+ mElapsedSeconds = progress * mDurationSeconds;
+ mState = Playing;
+
+ SetAnimatorsActive( true );
+ }
+}
+
+void Animation::PlayAfter( float delaySeconds )
+{
+ if( mState != Playing )
+ {
+ mDelaySeconds = delaySeconds;
+ mState = Playing;
+
+ if ( mSpeedFactor < 0.0f && mElapsedSeconds <= mPlayRange.x*mDurationSeconds )
+ {
+ mElapsedSeconds = mPlayRange.y * mDurationSeconds;
+ }
+
+ SetAnimatorsActive( true );
+
+ mCurrentLoop = 0;
+ }