标签:javascrip cto position har asc director tor track size
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)
cocos2d-x-lua基础系列教程一(hello lua)
标签:javascrip cto position har asc director tor track size
原文地址:http://www.cnblogs.com/slgkaifa/p/7063032.html