1234567891011121314151617181920212223242526272829 |
- 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) {
- }
- }
|