我在使屏幕过渡效果正常工作时遇到问题。我已经尝试了支持的淡入淡出和交叉淡入淡出效果,但是当过渡发生时,它是立即的,根本没有淡入淡出效果。其他一切都很好,我没有收到任何错误。我究竟做错了什么?
local storyboard = require ("storyboard")
local scene = storyboard.newScene()
local loading = require ("loading")
local loading = loading.new()
function switch()
storyboard.gotoScene("scene1","fade", 700)
end
function scene:enterScene( event )
timer.performWithDelay(2000,switch,1)
end
scene:addEventListener( "enterScene", scene )
return scene
我也试过
function switch()
storyboard.gotoScene("scene1",{effect="fade", time=700})
end
和
local options = {effect="fade", time=700}
function switch()
storyboard.gotoScene("scene1", options)
end