首页 > 代码库 > cocos2dx使用cocostudio导出的ui

cocos2dx使用cocostudio导出的ui

local ui
local function createLayerUI()
if not ui then
ui=cc.Layer:create();
createLayerUI=nil;
end
return ui;
end

local sceneGame=cc.Scene:create()
sceneGame:addChild(createLayerUI())
cc.Director:getInstance():runWithScene(sceneGame)
ui:addChild(ccs.GUIReader:shareReader():widgetFromJsonFile("res/SampleChangeEquip_1.json"))