import { _decorator, Component, EditBox, Node } from 'cc';
import { boss_info_data } from '../../../data/data';
import { receive_res_item } from './receive_res_item';
const { ccclass, property } = _decorator;

@ccclass('res_boss_info')
export class res_boss_info extends Component {
    @property(Node) bg:Node = null;
    @property(Node) bg_bar:Node = null;
    @property(Node) bar:Node = null;
    @property(Node) head:Node = null;
    private m_data:boss_info_data = null;
    protected start(): void {

    }
    public initView(data:boss_info_data){
        this.m_data = data;
        this.bg.getComponent(receive_res_item).initView( this.m_data.bg)
        this.bg_bar.getComponent(receive_res_item).initView( this.m_data.bg_bar)
        this.bar.getComponent(receive_res_item).initView( this.m_data.bar)
        this.head.getComponent(receive_res_item).initView( this.m_data.head)
    }
}


