cc.Class({
    extends: cc.Component,

    properties: {
    },

    onLoad: function () {
        let count = 0;
        let skeleton = this.node.getChildByName('Test').getComponent(sp.Skeleton);
        skeleton.setEventListener(function (track, event) {
            count++;
            if(count < 5){
                console.log(event);
                if(event.data.name === 'circle_g2b'){
                    skeleton.setAnimation(1, event.data.name, false);
                    // this.scheduleOnce(function () {
                    //     skeleton.setAnimation(1, event.data.name, false);
                    // });
                }
            }
        }.bind(this));
    },
});
