

cc.Class({
    extends: cc.Component,

    properties: {
        lineSkeleton: sp.Skeleton,
    },

    onLoad() {
        this.lineSkeleton.setAnimation(0, 'lx1_stand', true);
    },

    showAnimation(cb) {
        this.node.opacity = 0;
        this.node.runAction(cc.fadeIn(0.2));
        this.lineSkeleton.setAnimation(0, 'lx1_run', false);
        this.lineSkeleton.setCompleteListener(() => {
            this.lineSkeleton.setAnimation(0, 'lx1_stand', true);
            cb();
        });
    }

});
