import { _decorator, Component, Node, sp } from 'cc'; const { ccclass, property } = _decorator; @ccclass('KaPaiItem') export class KaPaiItem extends Component { @property(sp.Skeleton) dongwu: sp.Skeleton = null; start() { } public initSkin(data:sp.SkeletonData){ this.dongwu.skeletonData = data; this.dongwu.setAnimation(0,"animation",true); } public hideDongwu(){ this.dongwu.node.active = false; } public showDongWu(){ this.dongwu.node.active = true; } update(deltaTime: number) { } }