mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
[cocos2dx] Added SkeletonAnimation::findAnimation, closes #285
This commit is contained in:
parent
0d66cf3458
commit
ffafd67873
@ -165,6 +165,10 @@ spTrackEntry* SkeletonAnimation::addAnimation (int trackIndex, const std::string
|
|||||||
}
|
}
|
||||||
return spAnimationState_addAnimation(_state, trackIndex, animation, loop, delay);
|
return spAnimationState_addAnimation(_state, trackIndex, animation, loop, delay);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
spAnimation* SkeletonAnimation::findAnimation(const std::string& name) const {
|
||||||
|
return spSkeletonData_findAnimation(_skeleton->data, name.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
spTrackEntry* SkeletonAnimation::getCurrent (int trackIndex) {
|
spTrackEntry* SkeletonAnimation::getCurrent (int trackIndex) {
|
||||||
return spAnimationState_getCurrent(_state, trackIndex);
|
return spAnimationState_getCurrent(_state, trackIndex);
|
||||||
|
|||||||
@ -59,6 +59,7 @@ public:
|
|||||||
|
|
||||||
spTrackEntry* setAnimation (int trackIndex, const std::string& name, bool loop);
|
spTrackEntry* setAnimation (int trackIndex, const std::string& name, bool loop);
|
||||||
spTrackEntry* addAnimation (int trackIndex, const std::string& name, bool loop, float delay = 0);
|
spTrackEntry* addAnimation (int trackIndex, const std::string& name, bool loop, float delay = 0);
|
||||||
|
spAnimation* findAnimation(const std::string& name) const;
|
||||||
spTrackEntry* getCurrent (int trackIndex = 0);
|
spTrackEntry* getCurrent (int trackIndex = 0);
|
||||||
void clearTracks ();
|
void clearTracks ();
|
||||||
void clearTrack (int trackIndex = 0);
|
void clearTrack (int trackIndex = 0);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user