Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Scene Manager Passing Data — Gideros Forum

Scene Manager Passing Data

ArtLeeAppsArtLeeApps Member
edited June 2013 in General questions
Hi all,

I read this in the forums:
http://www.giderosmobile.com/forum/discussion/1474/passing-variables-with-scene-manager#Item_6

But 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

Sign In or Register to comment.