-- 截取场景
cc.utils:captureNode(scene, function(image)
    -- 图片转纹理
    local texture = cc.Texture2D:new()
    texture:initWithImage(image)
    image:release()
    -- 纹理创建精灵
    local sp = cc.Sprite:createWithTexture(texture)
    sp:addTo(scene):center()
end)

标签: Lua

添加新评论