Lua笔记:创建Layer层


   -----------------------创建Layer层---------------------------------
   local layerPlay = cc.Layer:create()
    -- add in play background
   local bg = cc.Sprite:create("Background.jpg")
   bg:setPosition(self.origin.x + self.visibleSize.width / 2, self.origin.y + self.visibleSize.height / 2)
   layerPlay:addChild(bg)
   -----------------------创建Layer层---------------------------------


	--------------------------- 代码中调用layer层 -----------------------------------------
    --加载层
    self.simulateDataLayer = require("SimulateDataLayer").create()
    self.layerbg:addChild(self.simulateDataLayer, 3)
	--------------------------- 代码中调用layer层 -----------------------------------------

你可能感兴趣的:(Lua笔记:创建Layer层)