spine配合anim的问题

image

2.4.3的CocosCreator 给spine暴露的这几个属性完全没用啊。。就想要k animation名啊。。

可以用帧事件代替,虽然相比会麻烦一点。
Animation
编辑器内设置回调方法名和参数


SpineAnim.ts

export default class NewClass extends cc.Component {
    @property(sp.Skeleton)
    sp: sp.Skeleton = null;

    spineEvent(anim: string) {
        this.sp.setAnimation(0, anim, true);
    }
}