查看节点信息。

local function dumpNode(node, deep)
    print("== deep:", deep)
    print("== parent:", node:getName(), tolua.type(node))
    print("== child ==")
    for _, child in ipairs(node:getChildren()) do
        print(child:getName(), tolua.type(child))
        dumpNode(child, deep + 1)
    end
    print("== child end ==")
end

标签: Lua

添加新评论