 
let ZUI = new class {


    constructor() {
    }
     
    getNodes(parent: cc.Node, map?): { [key: string]: cc.Node } {
        if (!map) { map = {} }
        let _findNodes = null
        _findNodes = function (node: cc.Node, map) {
            if (!map[node.name]) {
                map[node.name] = node
            }
            let _nodes = node.children
            for (let i = 0; i < _nodes.length; i++) {
                _findNodes(_nodes[i], map)
            }
        }
        _findNodes(parent, map)
        return map
    }
}
window["ZUI"] = ZUI