| 217 | } |
| 218 | |
| 219 | void Model::resume(uint32_t index, bool loop) { |
| 220 | Model::resume(); |
| 221 | if (!_isPlaying || _currentAnimation != index) { |
| 222 | Model::play(index, loop); |
| 223 | } else if (_isPlaying) { |
| 224 | if (!_animationGroups[_currentAnimation]->animations.empty()) { |
| 225 | Animation* animation = _animationGroups[_currentAnimation]->animations[0].get(); |
| 226 | if (animation->getElapsed() >= animation->getDuration()) { |
| 227 | Model::play(index, loop); |
| 228 | } |
| 229 | } else { |
| 230 | _loop = loop; |
| 231 | } |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | void Model::resume(String name, bool loop) { |
| 236 | int index = _modelDef->getAnimationIndexByName(name); |
nothing calls this directly
no test coverage detected