0
獲取畫面過渡效果工作
我有問題。我嘗試了支持的淡入淡出效果和crossFade效果,但是當過渡發生時,它是直接的,沒有淡化效果。其他一切正常,我沒有錯誤。我究竟做錯了什麼?電暈/ Lua的:屏幕轉換不工作
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
此外,你需要添加它們在createScene()。如果您一直等到enterScene()創建您的顯示,那麼直到空場景轉換到屏幕上纔會發生。 –