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

Method play

Source/Node/DragonBone.cpp:531–538  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

529}
530
531float DragonBone::play(String name, bool loop) {
532 AssertIf(_flags.isOn(Node::Cleanup), "can not operate on an invalid DragonBone");
533 if (_armatureProxy->getAnimation()->isPlaying()) {
534 _lastCompletedAnimationName.clear();
535 }
536 db::AnimationState* state = _armatureProxy->getAnimation()->fadeIn(name.toString(), _recoveryTime, loop ? 0 : 1);
537 return (state->getTotalTime() + _recoveryTime) / std::max(_speed, FLT_EPSILON);
538}
539
540void DragonBone::stop() {
541 AssertIf(_flags.isOn(Node::Cleanup), "can not operate on an invalid DragonBone");

Callers

nothing calls this directly

Calls 8

isOnMethod · 0.80
getAnimationMethod · 0.80
fadeInMethod · 0.80
getTotalTimeMethod · 0.80
clearMethod · 0.65
toStringMethod · 0.65
maxFunction · 0.50
isPlayingMethod · 0.45

Tested by

no test coverage detected