// ---------------------------------------------------------------------------- void CInterfaceAnim::update() { if ((_Duration == 0) || (_Finished)) return; const CWidgetManager::SInterfaceTimes × = CWidgetManager::getInstance()->getInterfaceTimes(); // Delta time limiter if ( ( times.frameDiffMs / 1000.0f ) > 0.1) _CurrentTime += 0.1; else _CurrentTime += ( times.frameDiffMs / 1000.0f ); // Stop the anim if we have to if (_AnimHasToBeStopped) { stop(); return; } // Do this here to let it play the last frame of the animation if (_CurrentTime >= _Duration) { _CurrentTime = _Duration; _AnimHasToBeStopped = true; } // Update tracks for (uint i = 0; i < _Tracks.size(); ++i) { CInterfaceTrack *pTrack = _Tracks[i]; pTrack->update (_CurrentTime); } }
// ---------------------------------------------------------------------------- void CInterfaceAnim::update() { if ((_Duration == 0) || (_Finished)) return; // Delta time limiter if (DT > 0.1) _CurrentTime += 0.1; else _CurrentTime += DT; // Stop the anim if we have to if (_AnimHasToBeStopped) { stop(); return; } // Do this here to let it play the last frame of the animation if (_CurrentTime >= _Duration) { _CurrentTime = _Duration; _AnimHasToBeStopped = true; } // Update tracks for (uint i = 0; i < _Tracks.size(); ++i) { CInterfaceTrack *pTrack = _Tracks[i]; pTrack->update (_CurrentTime); } }