- float delay = thirdAnimationDuration * CalculateDelay(x*mTileSize.width,y*mTileSize.height);
-
- mAnimation.AnimateTo( Property( mBoxes[idx], Actor::Property::ORIENTATION ), Quaternion( Radian( Degree( -angle ) ), Vector3::YAXIS ),
- AlphaFunction::EASE_OUT_SINE, TimePeriod( delay, thirdAnimationDuration ) );
- mAnimation.AnimateBy( Property( mBoxes[idx], Actor::Property::POSITION ), Vector3( 0.f, 0.f, -mCubeDisplacement ),
- AlphaFunction::BOUNCE, TimePeriod( delay, thirdAnimationDuration ) );
- mAnimation.AnimateTo( Property( mTiles[anotherIndex][idx], Actor::Property::COLOR ), HALF_BRIGHTNESS,
- AlphaFunction::EASE_OUT, TimePeriod( delay, thirdAnimationDuration ) );
- mAnimation.AnimateTo( Property( mTiles[mContainerIndex][idx], Actor::Property::COLOR ), FULL_BRIGHTNESS,
- AlphaFunction::EASE_IN, TimePeriod( delay, thirdAnimationDuration ) );
+ float delay = thirdAnimationDuration * CalculateDelay(x * mTileSize.width, y * mTileSize.height, forward);
+
+ mAnimation.AnimateTo(Property(mBoxes[idx], Actor::Property::ORIENTATION), Quaternion(Radian(-angle), Vector3::YAXIS), AlphaFunction::EASE_OUT_SINE, TimePeriod(delay, thirdAnimationDuration));
+ mAnimation.AnimateBy(Property(mBoxes[idx], Actor::Property::POSITION), Vector3(0.f, 0.f, -mCubeDisplacement), AlphaFunction::BOUNCE, TimePeriod(delay, thirdAnimationDuration));
+
+ mAnimation.AnimateTo(Property(mCurrentTiles[idx], Actor::Property::COLOR), HALF_BRIGHTNESS, AlphaFunction::EASE_OUT, TimePeriod(delay, thirdAnimationDuration));
+ mAnimation.AnimateTo(Property(mTargetTiles[idx], Actor::Property::COLOR), FULL_BRIGHTNESS, AlphaFunction::EASE_IN, TimePeriod(delay, thirdAnimationDuration));