- mConnectedToSceneGraph = true;
- mPropertyOwner->AddObserver(*this);
- }
-
- /**
- * Called when mPropertyOwner is connected to the scene graph.
- */
- virtual void PropertyOwnerConnected( PropertyOwner& owner )
- {
- mEnabled = true;
- }
-
- /**
- * Called when mPropertyOwner is disconnected from the scene graph.
- */
- virtual void PropertyOwnerDisconnected( BufferIndex bufferIndex, PropertyOwner& owner )
- {
- // If we are active, then bake the value if required
- if ( mActive && mDisconnectAction != Dali::Animation::Discard )
- {
- // Bake to target-value if BakeFinal, otherwise bake current value
- Update( bufferIndex, ( mDisconnectAction == Dali::Animation::Bake ? mCurrentProgress : 1.0f ), true );
- }
-
- mActive = false;
- mEnabled = false;
- }
-
- /**
- * Called shortly before mPropertyOwner is destroyed
- */
- virtual void PropertyOwnerDestroyed( PropertyOwner& owner )
- {
- mPropertyOwner = NULL;
- }
-
- /**
- * From AnimatorBase.
- */
- virtual void Update( BufferIndex bufferIndex, float progress, bool bake )
- {
- if( mLoopCount >= 0 )
- {
- // Update the progress value
- progress = SetProgress( progress );
- }
-
- float alpha = ApplyAlphaFunction( progress );
-