cococslua 创建图片的一种

   -- local textureCache = cc.Director:getInstance():getTextureCache()
                -- local pTexture = textureCache:addImage("image/cardbg.png")
                -- local image = cc.Sprite:createWithTexture(pTexture)
                -- image:setPosition(cc.p(100,100))
                -- image:setScale(3,3)
                -- node:addChild(image)

你可能感兴趣的:(cococslua 创建图片的一种)