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

Method resume

Source/Node/Model.cpp:219–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217}
218
219void 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
235void Model::resume(String name, bool loop) {
236 int index = _modelDef->getAnimationIndexByName(name);

Callers

nothing calls this directly

Calls 7

getMethod · 0.65
resumeMethod · 0.65
resumeFunction · 0.50
emptyMethod · 0.45
getElapsedMethod · 0.45
getDurationMethod · 0.45

Tested by

no test coverage detected