0
我使用的主任級試圖我的第一個應用電暈,但在我最初的代碼在這裏面臨的問題是我的代碼:導演錯誤:場景名稱必須是字符串。場景=零。 CORONA SDK
_W = display.contentWidth
_H = display.contentHeight
local director = require("director")
local mainGroup = display.newGroup()
local main = function()
mainGroup:insert(director.directorView)
director.changeScene("splashscreen")
return true
end
main()
這裏是我的啓動畫面代碼:
module(..., package.seall)
function new()
local localGroup = display.newGroup ();
local bgImage = display.newImageRect ("splash_screen_images.png", _W, _H);
bgImage:setReferencePoint(display.CentreRefrencePoint);
bgImage.x = _W/2;
bgImage.y = _H/2;
localGroup:insert(bgImage);
local delayTimer = timer.performWithDelay (3000, changeScreen, 1)
local function changeScreen1
director:changeScene("meuscreen");
timer.cancel (delayTimer);
end
return localGroup
end
我不是能夠運行這段代碼,總是收到此錯誤:
Director Error : The scene name must be a string. scene = nil