spine setMix 报错,不能使用 addAnimation 方法?还是怎么用?

  • Creator 版本:2.4.5

  • 目标平台:chrome

  • 重现方式:

@property({ type: sp.Skeleton, tooltip: "玩家龙骨" })
skeleton: sp.Skeleton = null;

// myPlayer.skeleton 就是 sp.Skeleton 对象
myPlayer.skeleton.addAnimation(0, 'wait', false);
myPlayer.skeleton.addAnimation(0, 'wait', false);
// trackIndex 都是0,第二次调用就会报这个错误 ⬇️
// spine.js:1840 Uncaught TypeError: this.data.getMix is not a function

根据官方示例 https://gitee.com/mirrors_cocos-creator/example-cases/blob/v2.4.3/assets/cases/spine/SpineCtrl.js

去调用 myPlayer.skeleton.setMix("wait", "wait", 0.1);
又报错:setMix 不是一个方法,但是在 chrome 里是可以看见有这个方法的,不知道 this.data 是哪儿来的?

在 chrome 里直接运行上面的命令,也会有上面的这些问题。

早上顶一顶,看看有人遇到美哟。。 :rofl: