mDisconnectAction( disconnectAction ),
mDefaultAlpha( defaultAlpha ),
mState(Dali::Animation::STOPPED),
- mProgressReachedMarker( 0.0f )
+ mProgressReachedMarker( 0.0f ),
+ mDelaySeconds( 0.0f )
{
}
}
}
+void Animation::PlayAfter( float delaySeconds )
+{
+ // The negative delay means play immediately.
+ delaySeconds = std::max( 0.f, delaySeconds );
+
+ mDelaySeconds = delaySeconds;
+
+ // Update the current playlist
+ mPlaylist.OnPlay( *this );
+
+ mState = Dali::Animation::PLAYING;
+
+ NotifyObjects();
+
+ SendFinalProgressNotificationMessage();
+
+ // mAnimation is being used in a separate thread; queue a message to set the value
+ PlayAfterMessage( mEventThreadServices, *mAnimation, delaySeconds );
+}
+
void Animation::Pause()
{
mState = Dali::Animation::PAUSED;