【已解决】使用CCArmature播放完动画回调怎么处理

使用CCArmature播放完动画回调怎么处理,看源码CCArmatureAnimation有setMovementEventCallFunc和setFrameEventCallFunc,请问这两个有什么区别。

这是我的代码
CCArmature *pBoom = CCArmature::create(“boom_1”);

        pBoom->setAnchorPoint(Anchor_Center);
        pBoom->setPosition(ccp(this->boundingBox().size.width/2,this->boundingBox().size.height/2));
        pBoom->getAnimation()->playByIndex(0);
        pBoom->getAnimation()->setAnimationScale(1.0f);
        
        addChild(pBoom);
        
        // 不是播放完调用回调,将setMovementEventCallFunc换成setFrameEventCallFunc不执行回调。
        pBoom->getAnimation()->setMovementEventCallFunc(this, SEL_MovementEventCallFunc(&IconSkill::delCallBack));

setMovementEventCallFunc 处理 动画 完成事件
setFrameEventCallFunc 处理 帧事件 回调
具体 请看 testcpp demo

要在cocostudio里面先设置帧事件才会有回调

你说的这个是帧事件

你需要判断下完成类型
enum MovementEventType
{
START, 开始
COMPLETE, 完成
LOOP_COMPLETE 循环完成
};

我解释的是为什么他将setMovementEventCallFunc换成setFrameEventCallFunc不执行回调

帮我解决了个问题,thanks

:7: :7: :7: :7: :7: :7: :7: