In my app I have a home scene and a game scene. The user enters the game scene by tapping a button in the home scene. When that happens I pass parameters to the game scene which I am able to access perfectly well in game’s createScene.
Here is the code that creates the params and passes them:
[lua] local options =
{
effect = “slideLeft”,
time = 250,
params =
{
val = 1,
}
}
storyboard.gotoScene( “game”, options )
[/lua]
No problems here. I am able to access event.params.val in game’s createScene.
However, when the user exits the game scene and returns to the home scene and then reenters the game scene the params are no longer there/accessible.
Here’s the code for leaving the game scene and entering the home scene:
[lua] local homeOptions =
{
effect = “slideRight”,
time = 250,
}
storyboard.gotoScene( “home”, homeOptions )[/lua]
I can’t understand why the params are accessible on the first run but unaccessible on the second run.
Does the community have any ideas?