diff --git a/spine-cocos2dx/src/spine/SkeletonAnimation.cpp b/spine-cocos2dx/src/spine/SkeletonAnimation.cpp index 5b15d9de0..c3947d72b 100644 --- a/spine-cocos2dx/src/spine/SkeletonAnimation.cpp +++ b/spine-cocos2dx/src/spine/SkeletonAnimation.cpp @@ -170,6 +170,18 @@ spTrackEntry* SkeletonAnimation::addAnimation (int trackIndex, const std::string return spAnimationState_addAnimation(_state, trackIndex, animation, loop, delay); } +spTrackEntry* SkeletonAnimation::setEmptyAnimation (int trackIndex, float mixDuration) { + return spAnimationState_setEmptyAnimation(_state, trackIndex, mixDuration); +} + +void SkeletonAnimation::setEmptyAnimations (float mixDuration) { + spAnimationState_setEmptyAnimations(_state, mixDuration); +} + +spTrackEntry* SkeletonAnimation::addEmptyAnimation (int trackIndex, float mixDuration, float delay) { + return spAnimationState_addEmptyAnimation(_state, trackIndex, mixDuration, delay); +} + spAnimation* SkeletonAnimation::findAnimation(const std::string& name) const { return spSkeletonData_findAnimation(_skeleton->data, name.c_str()); } diff --git a/spine-cocos2dx/src/spine/SkeletonAnimation.h b/spine-cocos2dx/src/spine/SkeletonAnimation.h index 11b300f8a..e15680cfd 100644 --- a/spine-cocos2dx/src/spine/SkeletonAnimation.h +++ b/spine-cocos2dx/src/spine/SkeletonAnimation.h @@ -73,6 +73,9 @@ public: spTrackEntry* setAnimation (int trackIndex, const std::string& name, bool loop); spTrackEntry* addAnimation (int trackIndex, const std::string& name, bool loop, float delay = 0); + spTrackEntry* setEmptyAnimation (int trackIndex, float mixDuration); + void setEmptyAnimations (float mixDuration); + spTrackEntry* addEmptyAnimation (int trackIndex, float mixDuration, float delay = 0); spAnimation* findAnimation(const std::string& name) const; spTrackEntry* getCurrent (int trackIndex = 0); void clearTracks ();