1.7.* 版本动画回调不被执行

系统平台:win7 64位系统
creator版本:1.7.0正式版和1.7.2 beta2
animationState监听动画事件,回调没有被执行

其他同学也遇到相同问题

http://forum.cocos.com/t/1-7-0-bug-bug/54262

代码:

demo在此

autoTouch.zip (46.9 KB)

终于有人遇到和我一样的了 解决了 请告知下 兄弟

好的:grin:

是用动画本身监听事件,不是用动画状态监听,
var anim=this.node.getComponent(cc.Animation);
anim.on(“finished”,function(){
cc.log(111);
},this)

好吧,我都是直接监听动画,还没用过监听动画状态,帮你顶一下.

请参考这个 PR 修改看看
https://github.com/cocos-creator/engine/pull/2056

好,我有空试试看

@1207269696

临时解决办法就是先播放动画再注册事件,如果是先注册事件再播放动画就会出现这个问题