在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
myscene.lua function ERROR_TRACBACK(msg) print (==========) print ("lua error is "..tostring(msg)) print (debug.traceback()) print ("=========") end cclog = function (…) print(string.format(...)) end CCSize winsize = CCDirector:shareDirector():getWinSize() ------入口方法 function main() cclog("entrn ") local bgSprite = CCSprite:create("HelloWorld.png"); local scene = CCScene:create(); bgSprite:setposition(winsize.width*0.5,winsize.height*0.5) local bglayer = cclayer:create() bglayer:addchild(bgsprite()) CCDirector:shareDirector():runWithScene(scene) end addChild(bglayer) xpcall(main,ERROR_TRACBACK) |
请发表评论