Hi Geeks,
I want to have global data… and I created a file - globals.lua
local data1 = {
level=1
score = 0
}
local data2= {}
bg_images[1] = “asd.jpg”
bg_images[2] = “asdfsf.jpg”
bg_images[3] = “blasfsdfah.jpg”
return data1,data2
Now in my scene.lua, I call this as follows…
local my_global = require(“globals”)
If I want to access the data2 ? … what is the method ? … is having 1 file per 1 global table the only solution ?
regards,
Joel