MCPcopy Create free account
hub / github.com/axmolengine/axmol / setAnimationStateData

Method setAnimationStateData

extensions/spine/src/spine/SkeletonAnimation.cpp:154–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152 }
153
154 void SkeletonAnimation::setAnimationStateData(AnimationStateData *stateData) {
155 AXASSERT(stateData, "stateData cannot be null.");
156
157 if (_ownsAnimationStateData) delete _state->getData();
158 delete _state;
159
160 _ownsAnimationStateData = false;
161 _state = new (__FILE__, __LINE__) AnimationState(stateData);
162 _state->setRendererObject(this);
163 _state->setListener(animationCallback);
164 }
165
166 void SkeletonAnimation::setMix(const std::string &fromAnimation, const std::string &toAnimation, float duration) {
167 _state->getData()->setMix(fromAnimation.c_str(), toAnimation.c_str(), duration);

Callers 1

initMethod · 0.80

Calls 2

setListenerMethod · 0.80
getDataMethod · 0.45

Tested by 1

initMethod · 0.64