Hi everybody,
I try to use the great Ricardo class, but I must admit I don’t understand the :insert() thing.
Assuming I have sample code (a former main.lua) that I want to put in a scene (exactly like the demo does with screen1 and screen2.lua) :
Mainly it’s said that I have to put my code here :
module(..., package.seeall)
-- Main function - MUST return a display.newGroup()
function new()
local localGroup = display.newGroup()
------ Your code here ------
-- MUST return a display.newGroup()
return localGroup
end
Okay. I guess that any display object have to endure the localGroup:insert(displayObject), but what about variables or arrays, or functions ?
If not inserted in the localGroup, they won’t be cleaned by the director class clean up method automatically called on each scene change, is that correct ?
Shortly : what should be localGroup:insert() ?
Thx for any hints. [import]uid: 9328 topic_id: 6081 reply_id: 306081[/import]