Hi all,
I have a problem when catch an event from Spine.
When the event was fired, i caught it but Event Data is NULL, i can not get name, string value or anything else.
This is my code:
_skeletonGo = SkeletonAnimation::createWithFile("spineboy.json", "spineboy.atlas");
_skeletonGo->setAnimation(1, "test", false);
_skeletonGo->setAnimationListener(this, animationStateEvent_selector(HelloWorld::onAnimationStateEvent));
void HelloWorld::onAnimationStateEvent(int trackIndex, spEventType type, spEvent* event, int loopCount) {
log("event"); // i debug this line and the event param is NULL
// std::string name = event->stringValue;
// if (name.compare("go") == 1) {
// log("GO!");
// }
}
Please give me the solution for this problem, thank so much