
const { ccclass, property } = cc._decorator;

@ccclass
export default class Main extends cc.Component {

    //路面父节点
    // @property(cc.Node)
    // private load_father: cc.Node = null;
    //路面数组
    // private load_nodes: cc.Node[] = [];

    // LIFE-CYCLE CALLBACKS:

    // onLoad () {}
    private ca: any;

    start() {
        // cc.v2();
        // let s = cc.v3();
        // console.log(s);

        // this.node.on('touchstart', (e) => {
        //     console.log(e.touch.getLocation());
        //     let camera = this.ca;
        //     // let ray = camera.getRay(cc.v2(376, 100));
        //     let ray = camera.getRay(e.touch.getLocation());
        //     let results = cc.geomUtils.intersect.raycast(cc.director.getScene(), ray);
        //     for (let i = 0; i < results.length; i++) {
        //         results[i].node.opacity = 100;
        //         console.log(results[i].node.name);
        //     }
        //     // console.log('results', results);
        // }, this);
    }

    update(dt) {
        // for (let i = 0; i < this.load_nodes.length; ++i) {
        //     this.load_nodes[i].z += 1;
        //     if (this.load_nodes[i].z > 0) {
        //         this.load_nodes[i].z = -660;
        //     }
        // }
    }

    /**初始化数据 */
    // private init() {
    //     this.load_nodes = this.load_father.children;
    //     console.log(this.load_nodes);
    // }
}
