Example #1
0
void MyPositionController::AnimationStarted(ref_ptr<Animation> anim)
{
  if (m_isPendingAnimation && m_animCreator != nullptr && anim != nullptr &&
      (anim->GetType() == Animation::MapFollow ||
       anim->GetType() == Animation::MapLinear))
  {
    m_isPendingAnimation = false;
    double const kDoNotChangeDuration = -1.0;
    m_animCreator(anim->GetType() == Animation::MapFollow ? anim->GetDuration() : kDoNotChangeDuration);
  }
}