I feel like such a N00b and I should know this already.
FYI, I'm using Director for a multi-level app. On each of the play levels, I want to have a control panel display. The functions of the control panel I want to be in their own modules. These sub-modules will be storing and retrieving data that needs to persist between levels.
So what I want to do is have:
controlPanel = require("controlpanel")
which will return a display group that has the control panel, its buttons and such. Those buttons will cause different objects to show on the screen. Those objects will need their own lua files to manage showing and hiding the items, adding data to and retrieving data from the objects.
So if inside controlpanel.lua, I do:
objectA = require("objectA")
objectB = require("objectB")
Then from level1.lua and level2.lua I do the require to load the control panel, can I access objectA and objectB?
Or do I have to from level1.lua load all three files, then in level2.lua also load all three files?