回报一个问题,
画面载入多个Spine动画 ( 约 3-40个 )
每个都使用代码 loader 载入spine动画,
并且在载入 sp.SkeletonData后,将 data指定给 Spine组件的skeletonData后,
立刻呼叫setCompleteListener进行Spine事件监听,
this.Spine.setCompleteListener( function( trackEntry )
{
let animationName = trackEntry.animation ? trackEntry.animation.name : "";
cc.log("[Spine][t:%s] animation [%s] complete.", trackEntry.trackIndex, animationName);
});
在模拟器上,每当编辑完代码,回到ccc执行模拟器,约有 20%的机率会出现下面这个异常
Simulator: ERROR: TypeError: this._compeleteListener is not a function.
(In 'this._compeleteListener(trackEntry, loopCount)', 'this._compeleteListener' is undefined),
location: script/jsb_spine.js:37:32