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

@ccclass('show_select_child_scene_item')
export class show_select_child_scene_item extends Component {
    @property(Node) lab_name:Node = null;
    private call_back = null;
    private m_data:scene_item_data = null;
    public initView(data:scene_item_data,call){
        this.m_data = data;
        this.call_back = call;
        this.lab_name.getComponent(Label).string = data.scene_diy_name;
        this.node.on(Node.EventType.TOUCH_END,()=>{
            if(this.call_back!=null){
                this.call_back(this.m_data)
            }
        })
    }
}


