// Let we don't change current loop value if the state was paused.
if(mState != Paused)
{
- mCurrentLoop = 0;
+ mCurrentLoop = 0;
+ mDelaySeconds = 0.0f;
}
mState = Playing;
// Let we don't change current loop value if the state was paused.
if(mState != Paused)
{
- mCurrentLoop = 0;
+ mCurrentLoop = 0;
+ mDelaySeconds = 0.0f;
}
mState = Playing;
if(mState == Playing || mState == Paused)
{
animationFinished = true; // The actor-thread should be notified of this
+ mIsStopped = true;
if(mEndAction != Dali::Animation::DISCARD)
{
mCurrentLoop = 0;
}
+ mDelaySeconds = 0.0f;
mElapsedSeconds = mPlayRange.x * mDurationSeconds;
mState = Stopped;
mIsFirstLoop = true;
return animationFinished;
}
-void Animation::Clear(BufferIndex bufferIndex)
+void Animation::ClearAnimator(BufferIndex bufferIndex)
{
// Stop animation immediatly.
Stop(bufferIndex);
mAnimatorSortRequired = false;
// Reset animation state values.
+ mIsStopped = false; ///< Do not make notify.
mPlayedCount = 0;
mCurrentLoop = 0;
}
}
}
- mState = Destroyed;
+ mIsStopped = false; ///< Do not make notify.
+ mState = Destroyed;
}
void Animation::SetLoopingMode(bool loopingMode)
mAnimators.PushBack(animator.Release());
}
-void Animation::Update(BufferIndex bufferIndex, float elapsedSeconds, bool& looped, bool& finished, bool& progressReached)
+void Animation::Update(BufferIndex bufferIndex, float elapsedSeconds, bool& stopped, bool& finished, bool& progressReached)
{
- looped = false;
+ // Reset mIsStopped flag now.
+ stopped = mIsStopped;
+ mIsStopped = false;
+
finished = false;
// Short circuit when animation isn't running
float markerFactor = signSpeedFactor * mProgressMarker;
// check it is looped
- looped = (elapsedFactor > edgeFactor);
+ const bool looped = (elapsedFactor > edgeFactor);
if(looped)
{