BUG1:
描述:动画编辑器只有两个关键帧时,程序不调用末尾帧事件回调函数。
cocos2d-x版本:3.2,3.3final
cocostudio版本:1.6
我在动画编辑器里编辑一个动画(比如简单地将一张图片的alpha,从0渐变到255),当动画只有两个关键帧(是关键帧,不是总帧数,如上图)的时候,我在最后一个关键帧上,添加一个帧事件end,则动画播放到最后一帧,不调用FrameEventCallBack。
auto amt = Armature::create("XXX");
amt->getAnimation()->setFrameEventCallFunc(CC_CALLBACK_4(MyClass::play_am_appear, this));
amt->play("appear");
void MyClass::play_am_appear(Bone *bone, const std::string& frameEventName, int originFrameIndex, int currentFrameIndex)
{
//此时不会调用到这里来
if(frameEventName == "end")
{
//todo something...
}
}
```
BUG2:
描述:ArmatureAnimation动画无法播放到最后一帧
cocos2d-x版本:3.3final(3.2未测试)
cocostudio版本:1.6
动画工程文件: 人物动画.zip (130 KB)
auto amt = Armature::create("HeroAnimationX");
amt->getAnimation()->play("hurt");
```
当我执行以上代码后,hurt动画最后停留在倒数第二帧(可以对照动画工程比较看)。