
const {ccclass, property} = cc._decorator;
@ccclass
export default class NewClass extends cc.Component {

    @property(cc.Label)
    label: cc.Label = null;

    @property
    text: string = 'hello';
    tween: cc.Tween<cc.Node>;
    speed: number;  //移动速度，时间参数，位移个固定
    move: boolean;  //是否在移动状态。
    num: number;
    difficulty: number;

    // LIFE-CYCLE CALLBACKS:

    onLoad () {

    }

    start () {
    }

    init(){

    }



    hide(){
        cc.tween(this.node)
        .to(0.2,{opacity:0})
        .call(() =>{
            this.node.active = false;
            this.node.removeFromParent();
            this.node = null;
        })
        .start();
    }

    update (dt) {
    }
}
