Hi all,
You really need a Category called "Regular Newbie Questions"
Knowing that "local" is best as its memory friendly.....
Question 1)
If you declare a variable in the main file using "local"
eg.
local gameHeight = application:getContentHeight()
Can scenes or Classes access the variable ?
* In some languages, the scope of the variable is known by called procedures.. etc.
Question 2)
If i were to use global variables for the application height and width. Given in this case i fix the orientation of the game to portrait. Can i get the size once in main and use it throughout the game... eg.
gameHeight = application:getContentHeight()
Comments
-Can scenes or Classes access the variable ?
No
Yes, and you can:
http://artleeapps.com/
Bubble Adventure - Colors
But then i would have to find a Lua forum, and i don't think i would find people more helpful and knowledgeable about Lua and Gideros in one place than here :-)
Plus, I'm still green and the distinction between the two is like flour and icing sugar, you can't really tell until you taste it.......
Likes: Platypus
http://artleeapps.com/
Bubble Adventure - Colors
http://artleeapps.com/
Bubble Adventure - Colors