标签:
装上了cocos code ide,配了路径之后,建立一个默认lua工程,发现无法调试,报错。
cc.FileUtils:getInstance():setPopupNotify(false)
cc.FileUtils:getInstance():addSearchPath("src/")
cc.FileUtils:getInstance():addSearchPath("res/")
require "config"
require "cocos.init"
local function main()
require("app.MyApp"):create():run()
end
local status, msg = xpcall(main, __G__TRACKBACK__)
if not status then
print(msg)
end
local function main()
local myApp = require("app.MyApp")
local appObj = myApp:create()
appObj:run()
end
local MyApp = class("MyApp", cc.load("mvc").AppBase)
function MyApp:onCreate()
math.randomseed(os.time())
end
return MyApp
标签:
原文地址:http://www.cnblogs.com/dydx/p/4301906.html