void Animation::pause(const char * clipId) { if (clipId == NULL) { if (_defaultClip) _defaultClip->pause(); } else { AnimationClip* clip = findClip(clipId); if (clip != NULL) clip->pause(); } }
AnimationClip* Animation::getClip(const char* id) { // If id is NULL return the default clip. if (id == NULL) { if (_defaultClip == NULL) createDefaultClip(); return _defaultClip; } else { return findClip(id); } }
void Animation::stop(const char* clipId) { // If id is NULL, play the default clip. if (clipId == NULL) { if (_defaultClip) _defaultClip->stop(); } else { // Find animation clip.. and play. AnimationClip* clip = findClip(clipId); if (clip != NULL) clip->stop(); } }
void Animation::play(const char* clipId) { // If id is NULL, play the default clip. if (clipId == NULL) { if (_defaultClip == NULL) createDefaultClip(); _defaultClip->play(); } else { // Find animation clip and play. AnimationClip* clip = findClip(clipId); if (clip != NULL) clip->play(); } }