Hi all,
I read this in the forums:
http://www.giderosmobile.com/forum/discussion/1474/passing-variables-with-scene-manager#Item_6But i cant get it to work :-S
seems simple enough...
---- calling code ----
print("level_select:"..i)
sceneManager:changeScene("unlock_level", 0, SceneManager.flipWithFade, easing.outBack, {userData = {levelSelected = i}}) |
---- new scene ----
unlock_level = Core.class(Sprite)
function unlock_level:init(params)
if params ~= nil then
self.clickedLevel = params.levelSelected
else
self.clickedLevel = 0
end
print("levelselect:" .. self.clickedLevel) |
---- The output ----
Uploading finished.
level_select:2
levelselect:0
Comments
http://artleeapps.com/
Bubble Adventure - Colors
check if your scenemanager.lua version contains options.userData
if not, you can get the new version here:
https://github.com/gideros/Scene-Manager
The version i had, did not have any reference to userData.
^:)^
http://artleeapps.com/
Bubble Adventure - Colors