const {ccclass, property} = cc._decorator;

@ccclass
export default class HarmNum extends cc.Component {

    /*===========================自动绑定组件开始===========================*/
    /*自动生成*/
    @property({type:cc.Label, displayName:""})
    private $text_lb:cc.Label = null;
    
	/*===========================自动绑定组件结束===========================*/

    /*===========================自动生成按钮事件开始==========================*/

	/*===========================自动生成按钮事件结束==========================*/

    protected onLoad(): void {
        let ani = this.$text_lb.getComponent(cc.Animation);
        ani.once(cc.Animation.EventType.FINISHED, ()=>{
            this.node.destroy();
        });
    }

    setHarm(harm: number){
        this.$text_lb.string = harm.toString();
    }
}