mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +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("walk", "jump", 0.2f);
|
||||||
skeletonNode->setMix("jump", "walk", 0.4f);
|
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);
|
skeletonNode->setAnimation(0, "walk", true);
|
||||||
// This shows how to setup animations to play back to back.
|
// This shows how to setup animations to play back to back.
|
||||||
//skeletonNode->addAnimation(0, "jump", false);
|
//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);
|
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;
|
listenerInstance = instance;
|
||||||
listenerMethod = method;
|
listenerMethod = method;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -65,7 +65,7 @@ public:
|
|||||||
void setAnimationStateData (AnimationStateData* stateData);
|
void setAnimationStateData (AnimationStateData* stateData);
|
||||||
void setMix (const char* fromAnimation, const char* toAnimation, float duration);
|
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* setAnimation (int trackIndex, const char* name, bool loop);
|
||||||
TrackEntry* addAnimation (int trackIndex, const char* name, bool loop, float delay = 0);
|
TrackEntry* addAnimation (int trackIndex, const char* name, bool loop, float delay = 0);
|
||||||
TrackEntry* getCurrent (int trackIndex = 0);
|
TrackEntry* getCurrent (int trackIndex = 0);
|
||||||
|
|||||||
@ -51,7 +51,7 @@ void _AtlasPage_disposeTexture (AtlasPage* self) {
|
|||||||
|
|
||||||
char* _Util_readFile (const char* path, int* length) {
|
char* _Util_readFile (const char* path, int* length) {
|
||||||
unsigned long size;
|
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));
|
CCFileUtils::sharedFileUtils()->fullPathForFilename(path).c_str(), "r", &size));
|
||||||
*length = size;
|
*length = size;
|
||||||
return data;
|
return data;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user