cc.Class({ extends: cc.Component, properties: { catNode: cc.Node, catSkeleton: sp.Skeleton, }, // LIFE-CYCLE CALLBACKS: onLoad() { this.catNode.on(cc.Node.EventType.TOUCH_START, () => { this.catSkeleton.setAnimation(0, 'hit', false); this.catSkeleton.setCompleteListener(() => { this.catSkeleton.setAnimation(0, 'stand', true); }); }, this); }, start() { }, // update (dt) {}, });