MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / updateProgress

Method updateProgress

Source/Animation/Action.cpp:560–583  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

558}
559
560bool Action::updateProgress() {
561 if (!_action) return true;
562 if (_elapsed == 0.0f) {
563 float start = _reversed ? _action->getDuration() : 0.0f;
564 /* reset actions to initial state */
565 Emit::available = false; // disable event callbacks while reseting
566 _action->update(_target, start);
567 Emit::available = true;
568 /* execute action right here */
569 if (0.0f == _action->getDuration()) {
570 _action->update(_target, start);
571 return true;
572 }
573 return false;
574 } else if (_elapsed >= _action->getDuration()) {
575 float stop = _reversed ? 0.0f : _elapsed;
576 _action->update(_target, stop);
577 return true;
578 } else {
579 float current = _reversed ? _action->getDuration() - _elapsed : _elapsed;
580 _action->update(_target, current);
581 return false;
582 }
583}
584
585NS_DORA_END

Callers 2

scheduleMethod · 0.80
updateMethod · 0.80

Calls 2

getDurationMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected