I am using scene manager ( I made sure to add the scene manager code as SceneManager.lua) , and when I use this line, it comes out with an error:
sceneManager:changeScene("start", 1, SceneManager.moveFromRight, easing.outBack)
This is the error:
main.lua:7: attempt to index global 'easing' (a nil value)
stack traceback:
main.lua:7: in main chunk
If anybody could explain what "easing" is and why it comes up with an error, that would be great.
Comments
SceneManager.lua:266: attempt to index field '?' (a nil value)
stack traceback:
SceneManager.lua:266: in function 'changeScene'
main.lua:7: in main chunk
It seems that you are trying to change a scene that is not existed.
sceneManager = SceneManager.new({
["start"] = start,
["mode_select"] = mode_select
})
stage:addChild(sceneManager)
start = gideros.class(Sprite)
sceneManager:changeScene("start", 1, SceneManager.moveFromRight, easing.outBack)
function start:init()
local background = Bitmap.new(Texture.new("Space_Background.jpg"))
stage:addChild(background)
end
main.lua
Writing your code as: