| 239 | } |
| 240 | |
| 241 | void AnimationSystem::PushAnimation(drape_ptr<Animation> && animation) |
| 242 | { |
| 243 | #ifdef DEBUG_ANIMATIONS |
| 244 | LOG(LINFO, ("Push animation", animation->GetType())); |
| 245 | #endif |
| 246 | |
| 247 | auto pList = std::make_shared<TAnimationList>(); |
| 248 | pList->emplace_back(std::move(animation)); |
| 249 | |
| 250 | bool startImmediately = m_animationChain.empty(); |
| 251 | m_animationChain.push_back(pList); |
| 252 | if (startImmediately) |
| 253 | pList->front()->OnStart(); |
| 254 | |
| 255 | #ifdef DEBUG_ANIMATIONS |
| 256 | Print(); |
| 257 | #endif |
| 258 | } |
| 259 | |
| 260 | void AnimationSystem::FinishAnimations(std::function<bool(std::shared_ptr<Animation> const &)> const & predicate, |
| 261 | bool rewind, bool finishAll) |