1234567891011121314151617181920212223242526 |
- cc.Class({
- extends: cc.Component,
- properties: {
- catNode: cc.Node,
- catSkeleton: sp.Skeleton,
- },
-
- 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() {
- },
-
- });
|