Does anyone know how to pass variables from one scene to another?
Label: corona android iphone ipad building error inmobi problem display screen View image tableView failed object physics touch button game lua config event listener |
How do I pass variables with directors class?
Nevermind, solved it
You can use global variables, database or a lua file (package) to store them.
Solved it with global variables :) Thanks though!
Maybe I missed something, but my global variables are not going from one module to another?
I have:
newGame = true
gameRound = 0
in mainmenu.lua
and when pushing the button and using director:changeScene("game") newGame and gameRound are equal to nil?
Those are not real globals. Try use _G.newGame / _G.gameRound instead :)
views:1233 update:2011/10/13 9:25:17
热门文章
GameCenter LeaderBoards and Achievements Enabled Through OpenFeint
send message and call to a person
Forum: Report Spam + PM
[INSTALL_PARSE_FAILED_NO_CERTIFICATES]
[SOLVED] Director ERROR: Failed to execute new( params ) function on 'screen1'
Too many (200) local variables
Corona SVG Level Builder released. Drag and drop physics level editor with Inkscape and SVG.
Small bug in Collectible Items example
Pivot Joints and apparent elasticity
Can't make removeSelf() delayed
send message and call to a person
Forum: Report Spam + PM
[INSTALL_PARSE_FAILED_NO_CERTIFICATES]
[SOLVED] Director ERROR: Failed to execute new( params ) function on 'screen1'
Too many (200) local variables
Corona SVG Level Builder released. Drag and drop physics level editor with Inkscape and SVG.
Small bug in Collectible Items example
Pivot Joints and apparent elasticity
Can't make removeSelf() delayed
相关文章
SPH fluid engine
Event Listener is spawning a lot of objects! Help!
How can you ask if a number is 5, give or take 1? (they are example numbers)
Player and Map scrolling at different rates
Local multiplayer or pubnub alternative
Lua Module Function Critiqued
Reusable corona libraries
Cannot Build ( Error #5 ) - Server side?
Custom Controls
Problem on changing scene with Native Alert
Event Listener is spawning a lot of objects! Help!
How can you ask if a number is 5, give or take 1? (they are example numbers)
Player and Map scrolling at different rates
Local multiplayer or pubnub alternative
Lua Module Function Critiqued
Reusable corona libraries
Cannot Build ( Error #5 ) - Server side?
Custom Controls
Problem on changing scene with Native Alert
corona forums © 2003-2011