首页 > 代码库 > cocos2dx3.2 spine动画
cocos2dx3.2 spine动画
NEWSkeletonAnimation* skeletonNode;
skeletonNode = NEWSkeletonAnimation::createWithFile("Maid.json", "Maid.atlas", 0.6f); skeletonNode->startListener = [this] (int trackIndex) { spTrackEntry* entry = spAnimationState_getCurrent(skeletonNode->state, trackIndex); const char* animationName = (entry && entry->animation) ? entry->animation->name : 0; log("%d start: %s", trackIndex, animationName); }; skeletonNode->endListener = [=] (int trackIndex) { log("%d end", trackIndex); m_isSkeletonSiwtch = false; }; skeletonNode->completeListener = [] (int trackIndex, int loopCount) { log("%d complete: %d", trackIndex, loopCount); }; skeletonNode->eventListener = [] (int trackIndex, spEvent* event) { log("%d event: %s, %d, %f, %s", trackIndex, event->data->name, event->intValue, event->floatValue, event->stringValue); }; skeletonNode->setPosition(100, 100); this->addChild(skeletonNode); //skeletonNode->setAnimation(0, "Event", false);
cocos2dx3.2 spine动画
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。