mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-14 02:58:44 +08:00
Renamed setListener to setAnimationListener.
This commit is contained in:
parent
9443ecb09c
commit
957f5a539e
@ -22,7 +22,7 @@ bool ExampleLayer::init () {
|
||||
skeletonNode->setMix("walk", "jump", 0.2f);
|
||||
skeletonNode->setMix("jump", "walk", 0.4f);
|
||||
|
||||
skeletonNode->setListener(this, animationStateEvent_selector(ExampleLayer::animationStateEvent));
|
||||
skeletonNode->setAnimationListener(this, animationStateEvent_selector(ExampleLayer::animationStateEvent));
|
||||
skeletonNode->setAnimation(0, "walk", true);
|
||||
// This shows how to setup animations to play back to back.
|
||||
//skeletonNode->addAnimation(0, "jump", false);
|
||||
|
||||
@ -122,7 +122,7 @@ void CCSkeletonAnimation::setMix (const char* fromAnimation, const char* toAnima
|
||||
AnimationStateData_setMixByName(state->data, fromAnimation, toAnimation, duration);
|
||||
}
|
||||
|
||||
void CCSkeletonAnimation::setListener (CCObject* instance, SEL_AnimationStateEvent method) {
|
||||
void CCSkeletonAnimation::setAnimationListener (CCObject* instance, SEL_AnimationStateEvent method) {
|
||||
listenerInstance = instance;
|
||||
listenerMethod = method;
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@ public:
|
||||
void setAnimationStateData (AnimationStateData* stateData);
|
||||
void setMix (const char* fromAnimation, const char* toAnimation, float duration);
|
||||
|
||||
void setListener (CCObject* instance, SEL_AnimationStateEvent method);
|
||||
void setAnimationListener (CCObject* instance, SEL_AnimationStateEvent method);
|
||||
TrackEntry* setAnimation (int trackIndex, const char* name, bool loop);
|
||||
TrackEntry* addAnimation (int trackIndex, const char* name, bool loop, float delay = 0);
|
||||
TrackEntry* getCurrent (int trackIndex = 0);
|
||||
|
||||
@ -51,7 +51,7 @@ void _AtlasPage_disposeTexture (AtlasPage* self) {
|
||||
|
||||
char* _Util_readFile (const char* path, int* length) {
|
||||
unsigned long size;
|
||||
char* data = reinterpret_cast<char*>(CCFileUtils::sharedFileUtils()->getFileData(
|
||||
char* data = reinterpret_cast<char*>(CCFileUtils::sharedFileUtils()->getFileData(
|
||||
CCFileUtils::sharedFileUtils()->fullPathForFilename(path).c_str(), "r", &size));
|
||||
*length = size;
|
||||
return data;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user