import { _decorator, Component, Label, Node } from 'cc';
import { level_list_item_data } from '../../data/data';
const { ccclass, property } = _decorator;

@ccclass('level_list_item')
export class level_list_item extends Component {
    @property(Node) lab_name:Node = null;
    private m_data:level_list_item_data = null;
    public initView(data:level_list_item_data,call_back){
        this.m_data = data;
        this.lab_name.getComponent(Label).string = data.name;
        this.node.on(Node.EventType.TOUCH_END,()=>{
            call_back(this.m_data)
        })
    }
}


