| 529 | } |
| 530 | |
| 531 | float 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 | |
| 540 | void DragonBone::stop() { |
| 541 | AssertIf(_flags.isOn(Node::Cleanup), "can not operate on an invalid DragonBone"); |
nothing calls this directly
no test coverage detected